minor implementation
basic expr parsing (not complex like compound, lambda)
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
|
||||
void ast_node_add_child(ASTNode *parent, ASTNode *child);
|
||||
|
||||
void ast_node_free(ASTNode *node);
|
||||
@@ -33,4 +32,30 @@ ASTNode *ast_node_type_star(Token tok_star);
|
||||
|
||||
ASTNode *ast_node_type_void();
|
||||
|
||||
ASTNode *ast_node_id(Token id);
|
||||
ASTNode *ast_node_id(Token id);
|
||||
|
||||
ASTNode *ast_node_num(Token num);
|
||||
|
||||
ASTNode *ast_node_str(Token str);
|
||||
|
||||
ASTNode *ast_node_star(Token star);
|
||||
|
||||
ASTNode *ast_node_andref(Token andref);
|
||||
|
||||
ASTNode *ast_node_expr(Token caller);
|
||||
|
||||
ASTNode *ast_node_param_list(Token tok_lparen);
|
||||
|
||||
ASTNode *ast_node_param(Token id, ASTNode *type);
|
||||
|
||||
ASTNode *ast_node_compound(Token tok_lcurly);
|
||||
|
||||
ASTNode *ast_node_lambda(ASTNode *param_list, ASTNode *body);
|
||||
|
||||
ASTNode *ast_node_stmt_return(Token tok_return, ASTNode *expr);
|
||||
|
||||
ASTNode *ast_node_stmt_expr(ASTNode *expr);
|
||||
|
||||
ASTNode *ast_node_stmt_if(Token tok_if, ASTNode *condition, ASTNode *then_branch, ASTNode *else_branch);
|
||||
|
||||
ASTNode *ast_node_stmt_set(Token tok_dollar, ASTNode *id, ASTNode *expr);
|
||||
|
||||
Reference in New Issue
Block a user