summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2021-01-30 17:29:16 +0000
committerOri Bernstein <ori@eigenstate.org>2021-01-30 17:29:16 +0000
commit72819dcccff346a919f36f8cb8b1ab2014ab4977 (patch)
treeaae5592b922fd0e3deebc598cb64bb8d25b6af6f
parentd4030509dc5ebcfb8e3922ab01bda9ada8cd094d (diff)
downloadmc-72819dcccff346a919f36f8cb8b1ab2014ab4977.tar.gz
Allow omitting the parameter name when it's unneeded.
-rw-r--r--parse/gram.y1
1 files changed, 1 insertions, 0 deletions
diff --git a/parse/gram.y b/parse/gram.y
index 8e8e51b..9b8f36e 100644
--- a/parse/gram.y
+++ b/parse/gram.y
@@ -439,6 +439,7 @@ declcore: name {$$ = mkdecl($1->loc, $1, mktyvar($1->loc));}
typedeclcore
: name Tcolon type {$$ = mkdecl($1->loc, $1, $3);}
+ | Tcolon type {$$ = mkpseudodecl($1->loc, $2);}
;
name : Tident {$$ = mkname($1->loc, $1->id);}