summaryrefslogtreecommitdiff
path: root/src/parser.mly
diff options
context:
space:
mode:
Diffstat (limited to 'src/parser.mly')
-rw-r--r--src/parser.mly5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/parser.mly b/src/parser.mly
index 50b2da34..76619f59 100644
--- a/src/parser.mly
+++ b/src/parser.mly
@@ -1011,7 +1011,10 @@ typquant:
name_sect:
| Lsquare Id Eq String Rsquare
- { Name_sect_aux(Name_sect_some($4), loc ()) }
+ {
+ if $2 <> "name" then
+ raise (Parse_error_locn ((loc ()),"Unexpected id \""^$2^"\" in name_sect (should be \"name\")"));
+ Name_sect_aux(Name_sect_some($4), loc ()) }
c_def_body:
| typ id