summaryrefslogtreecommitdiff
path: root/parse/gram.y
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-05-09 23:25:36 -0700
committerOri Bernstein <ori@eigenstate.org>2016-05-09 23:25:50 -0700
commit81faf1634871ae20739df2d5eb6525f47d14da77 (patch)
treecfaf30ea3d5be7ba3d6b2cef0a349f7730238493 /parse/gram.y
parentedcfec9ee647e08da6ce6a9034aa895ad137e1ba (diff)
downloadmc-81faf1634871ae20739df2d5eb6525f47d14da77.tar.gz
Only allow one level of namespace in a name.
Fixes #113
Diffstat (limited to 'parse/gram.y')
-rw-r--r--parse/gram.y4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse/gram.y b/parse/gram.y
index c53c763..be5054e 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -359,7 +359,9 @@ typedeclcore
;
name : Tident {$$ = mkname($1->loc, $1->id);}
- | Tident Tdot name {$$ = $3; setns($3, $1->id);}
+ | Tident Tdot Tident {
+ $$ = mkname($3->loc, $3->id); setns($$, $1->id);
+ }
;
implstmt: Timpl name type optauxtypes {