implemented member access parsing
This commit is contained in:
parent
c566f7d490
commit
d1b89939ae
4 changed files with 33 additions and 1 deletions
4
lc.c
4
lc.c
|
|
@ -72,6 +72,10 @@ void print_ast(ast_node *node, int depth) {
|
|||
printf("Cast: %.*s\n", (int)node->expr.cast.type_len, node->expr.cast.type);
|
||||
print_ast(node->expr.cast.value, depth + 1);
|
||||
break;
|
||||
case NODE_ACCESS:
|
||||
printf("Access: %.*s\n", (int)node->expr.access.member_len, node->expr.access.member);
|
||||
print_ast(node->expr.access.expr, depth + 1);
|
||||
break;
|
||||
case NODE_BINARY:
|
||||
printf("BinaryOp (%s)\n", get_op_str(node->expr.binary.operator));
|
||||
print_ast(node->expr.binary.left, depth + 1);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue