summaryrefslogtreecommitdiff
path: root/src/parser.y
diff options
context:
space:
mode:
authorclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-02-27 22:30:36 (GMT)
committerclifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c>2010-02-27 22:30:36 (GMT)
commit955de4aa1b2100b8f9d0c9bd407d1cd127ed2212 (patch)
treed742bccb0cafe4590a8f2272268b38eba7af4e45 /src/parser.y
parent738174847a7d78cba9c2b7eb6fb485da945363f1 (diff)
Clifford Wolf:
Added include<...> statement Prepared use<...> statement git-svn-id: http://svn.clifford.at/openscad/trunk@457 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'src/parser.y')
-rw-r--r--src/parser.y8
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);
contact: Jan Huwald // Impressum