Definitions and function headers for the internal "Number" type.
static TokenType rightAssociativeOperators[TOKENTYPE_MAX+1]
Definition: parse.h:51
ASTNode * function_call_expression(void)
Parse a function call expression into an AST.
Definition: expression.c:127
ASTNode * function_declaration(void)
Parse a function declaration statement into an AST.
Definition: declaration.c:43
static TokenType operatorPrecedence[]
Operator precedence values. Precedence ranges from 0-15, 15 being the first to be computed.
Definition: parse.h:39
TokenType check_for_type(void)
Ensure current token is a type token, and scan the next token if so.
Definition: statement.c:84
void match_token(TokenType type)
Ensure current token is of a given type, and scan the next token if so.
Definition: statement.c:18
void variable_declaration(void)
Parse a variable declaration statement into an AST.
Definition: declaration.c:18
ASTNode * parse_statements(void)
Parse a set of statements into ASTs and generate them into an AST.
Definition: statement.c:324
int match_type(Number *out)
Matches a valid type in the input stream.
Definition: statement.c:53
ASTNode * parse_binary_expression(void)
Convenience wrapper for parse_binary_expression_recursive.
Definition: expression.c:236
TokenType
Types of scannable tokens.
Definition: scan.h:20
@ T_AND
Definition: scan.h:36
@ T_NAND
Definition: scan.h:39
@ TOKENTYPE_MAX
Definition: scan.h:81
@ T_XOR
Definition: scan.h:38
@ T_NOR
Definition: scan.h:40
@ T_GE
Definition: scan.h:34
@ T_STAR
Definition: scan.h:25
@ T_LT
Definition: scan.h:31
@ T_LE
Definition: scan.h:33
@ T_SLASH
Definition: scan.h:26
@ T_XNOR
Definition: scan.h:41
@ T_EQ
Definition: scan.h:29
@ T_ASSIGN
Definition: scan.h:60
@ T_GT
Definition: scan.h:32
@ T_PLUS
Definition: scan.h:23
@ T_MINUS
Definition: scan.h:24
@ T_OR
Definition: scan.h:37
@ T_NEQ
Definition: scan.h:30
@ T_EXPONENT
Definition: scan.h:27
Component of the abstract syntax tree built during parsing.
Definition: tree.h:20
Container for various kinds of number data.
Definition: number.h:56
Function headers for abstract syntax tree parsing.