diff options
Diffstat (limited to 'src/parser.y')
-rw-r--r-- | src/parser.y | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/parser.y b/src/parser.y index a0e4ac9..8d31cd5 100644 --- a/src/parser.y +++ b/src/parser.y @@ -74,6 +74,7 @@ public: %token <text> TOK_ID %token <text> TOK_STRING +%token <text> TOK_USE %token <number> TOK_NUMBER %token TOK_TRUE @@ -117,11 +118,16 @@ public: input: /* empty */ | + TOK_USE { module->usedlibs.append($1); } input | statement input ; +inner_input: + /* empty */ | + statement inner_input ; + statement: ';' | - '{' input '}' | + '{' inner_input '}' | module_instantiation { if ($1) { module->children.append($1); |