|
Luma 0.1.0
A low-level compiled alternative to C, C++, and more!
|


Go to the source code of this file.
Macros | |
| #define | IS_EXPR(node) ((node)->type >= AST_EXPR_LITERAL && (node)->type <= AST_EXPR_GROUPING) |
| #define | IS_STMT(node) ((node)->type >= AST_STMT_EXPRESSION && (node)->type <= AST_STMT_STRUCT) |
| #define | IS_TYPE(node) ((node)->type >= AST_TYPE_BASIC && (node)->type <= AST_TYPE_ENUM) |
| #define | IS_PROGRAM(node) ((node)->type == AST_PROGRAM) |
| #define | IS_EXPR_STMT(node) ((node)->type == AST_STMT_EXPRESSION) |
| #define | IS_LITERAL(node) ((node)->type == AST_EXPR_LITERAL) |
| #define | IS_BINARY(node) ((node)->type == AST_EXPR_BINARY) |
| #define | IS_GROUPING(node) ((node)->type == AST_EXPR_GROUPING) |
| #define | IS_UNARY(node) ((node)->type == AST_EXPR_UNARY) |
| #define | IS_CALL(node) ((node)->type == AST_EXPR_CALL) |
| #define | IS_VAR_DECL(node) ((node)->type == AST_STMT_VAR_DECL) |
| #define | IS_FUNC_DECL(node) ((node)->type == AST_STMT_FUNCTION) |
| #define | IS_BLOCK(node) ((node)->type == AST_STMT_BLOCK) |
| #define | IS_IF(node) ((node)->type == AST_STMT_IF) |
| #define | IS_LOOP(node) ((node)->type == AST_STMT_LOOP) |
| #define | IS_RETURN(node) ((node)->type == AST_STMT_RETURN) |
Functions | |
| const char * | node_type_to_string (NodeType type) |
| const char * | binop_to_string (BinaryOp op) |
| const char * | unop_to_string (UnaryOp op) |
| const char * | literal_type_to_string (LiteralType type) |
| void | print_prefix (const char *prefix, bool is_last) |
| void | print_ast (const AstNode *node, const char *prefix, bool is_last, bool root) |
| #define IS_BINARY | ( | node | ) | ((node)->type == AST_EXPR_BINARY) |
| #define IS_BLOCK | ( | node | ) | ((node)->type == AST_STMT_BLOCK) |
| #define IS_CALL | ( | node | ) | ((node)->type == AST_EXPR_CALL) |
| #define IS_EXPR | ( | node | ) | ((node)->type >= AST_EXPR_LITERAL && (node)->type <= AST_EXPR_GROUPING) |
| #define IS_EXPR_STMT | ( | node | ) | ((node)->type == AST_STMT_EXPRESSION) |
| #define IS_FUNC_DECL | ( | node | ) | ((node)->type == AST_STMT_FUNCTION) |
| #define IS_GROUPING | ( | node | ) | ((node)->type == AST_EXPR_GROUPING) |
| #define IS_IF | ( | node | ) | ((node)->type == AST_STMT_IF) |
| #define IS_LITERAL | ( | node | ) | ((node)->type == AST_EXPR_LITERAL) |
| #define IS_LOOP | ( | node | ) | ((node)->type == AST_STMT_LOOP) |
| #define IS_PROGRAM | ( | node | ) | ((node)->type == AST_PROGRAM) |
| #define IS_RETURN | ( | node | ) | ((node)->type == AST_STMT_RETURN) |
| #define IS_STMT | ( | node | ) | ((node)->type >= AST_STMT_EXPRESSION && (node)->type <= AST_STMT_STRUCT) |
| #define IS_TYPE | ( | node | ) | ((node)->type >= AST_TYPE_BASIC && (node)->type <= AST_TYPE_ENUM) |
| #define IS_UNARY | ( | node | ) | ((node)->type == AST_EXPR_UNARY) |
| #define IS_VAR_DECL | ( | node | ) | ((node)->type == AST_STMT_VAR_DECL) |
| const char * binop_to_string | ( | BinaryOp | op | ) |
| const char * literal_type_to_string | ( | LiteralType | type | ) |
| const char * node_type_to_string | ( | NodeType | type | ) |
| void print_ast | ( | const AstNode * | node, |
| const char * | prefix, | ||
| bool | is_last, | ||
| bool | root | ||
| ) |
| void print_prefix | ( | const char * | prefix, |
| bool | is_last | ||
| ) |
| const char * unop_to_string | ( | UnaryOp | op | ) |