Added some more data to expression
parent
c8e292bd0a
commit
35fb48f8b8
|
@ -237,13 +237,13 @@ expression:
|
|||
$$ = $2;
|
||||
}
|
||||
| number {
|
||||
node_init($$ = malloc(sizeof(node_t)), EXPRESSION, NULL, 1, $1);
|
||||
node_init($$ = malloc(sizeof(node_t)), EXPRESSION, /*NULL*/ strdup("number"), 1, $1);
|
||||
}
|
||||
| identifier {
|
||||
node_init($$ = malloc(sizeof(node_t)), EXPRESSION, NULL, 1, $1);
|
||||
node_init($$ = malloc(sizeof(node_t)), EXPRESSION, /*NULL*/ strdup("identifier"), 1, $1);
|
||||
}
|
||||
| identifier '(' argument_list ')' {
|
||||
node_init($$ = malloc(sizeof(node_t)), EXPRESSION, NULL, 2, $1, $3);
|
||||
node_init($$ = malloc(sizeof(node_t)), EXPRESSION, /*NULL*/ strdup("function_call"), 2, $1, $3);
|
||||
}
|
||||
;
|
||||
|
||||
|
|
Loading…
Reference in New Issue