lang: ast: fix incorrect return types; add function to determine expression tokens

This commit is contained in:
2024-11-27 12:56:10 +00:00
parent cd89c20beb
commit ad25b89af0
6 changed files with 127 additions and 21 deletions

View File

@@ -20,6 +20,7 @@ enum ivy_ast_node_type {
IVY_AST_LAMBDA,
IVY_AST_UNIT_PACKAGE,
IVY_AST_UNIT_IMPORT,
IVY_AST_EXPR,
IVY_AST_INT,
IVY_AST_DOUBLE,
IVY_AST_STRING,
@@ -162,6 +163,11 @@ struct ivy_ast_unit_import_node {
b_queue n_ident;
};
struct ivy_ast_expr_node {
struct ivy_ast_node n_base;
struct ivy_ast_node *n_child;
};
struct ivy_ast_int_node {
struct ivy_ast_node n_base;
/* lex token of type IVY_TOK_INT. */