module Drizzle

Overview

Drizzle is a (currently interpreted, eventually compiled) programming language that tries to strike a balance between readability and type safety, with a bit of speed thrown into the mix.

Please bear in mind that these docs are generated by running crystal docs on the source of the interpreter / compiler. As a result, these docs are intended for the people who wish to contribute to the implemenation of the language.

For usage documentation, please see here instead.

Defined in:

drizzle/environment.cr
drizzle/ast/node.cr
drizzle/ast/statement.cr
drizzle/token.cr
drizzle/ast/block.cr
drizzle/ast/expression.cr
drizzle/ast/boolean_literal.cr
drizzle/ast/identifier.cr
drizzle/ast/call_expression.cr
drizzle/ast/expression_statement.cr
drizzle/ast/typed_identifier.cr
drizzle/ast/function.cr
drizzle/ast/if_statement.cr
drizzle/ast/infix_expression.cr
drizzle/ast/integer_literal.cr
drizzle/ast/let.cr
drizzle/ast/prefix_expression.cr
drizzle/ast/program.cr
drizzle/ast/return.cr
drizzle/object/types.cr
drizzle/object/object.cr
drizzle/object/boolean.cr
drizzle/object/error.cr
drizzle/object/function.cr
drizzle/object/integer.cr
drizzle/object/null.cr
drizzle/object/return_value.cr
drizzle/evaluator.cr
drizzle/lexer.cr
drizzle/parser.cr
drizzle/repl.cr
drizzle/version.cr
drizzle.cr

Constant Summary

Keywords = {"let" => TokenType::LET, "def" => TokenType::FUNCTION, "return" => TokenType::RETURN, "if" => TokenType::IF, "elsif" => TokenType::ELSIF, "else" => TokenType::ELSE, "not" => TokenType::NOT, "true" => TokenType::TRUE, "false" => TokenType::FALSE}

Hash of all keywords in Drizzle to their corresponding TokenTypes.

Used as part of the Lexer's process of generating a new Token in order to determine whether a read string of characters is a keyword or not.

PrecedenceMap = {TokenType::EQ => Precedence::EQUALS, TokenType::NOT_EQ => Precedence::EQUALS, TokenType::LT => Precedence::LESSGREATER, TokenType::GT => Precedence::LESSGREATER, TokenType::PLUS => Precedence::SUM, TokenType::MINUS => Precedence::SUM, TokenType::ASTERISK => Precedence::PRODUCT, TokenType::SLASH => Precedence::PRODUCT, TokenType::LEFT_PAREN => Precedence::CALL}

Mapping of TokenTypes to Precedence values to use in infix expression parsing

VERSION = "0.1.0"