summaryrefslogtreecommitdiff
path: root/src/map/magic-interpreter-parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/magic-interpreter-parser.y')
-rw-r--r--src/map/magic-interpreter-parser.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/magic-interpreter-parser.y b/src/map/magic-interpreter-parser.y
index 6d310bd..bae6844 100644
--- a/src/map/magic-interpreter-parser.y
+++ b/src/map/magic-interpreter-parser.y
@@ -119,6 +119,7 @@ find_constant(char *name);
%token CALL
%token SILENT
%token LOCAL
+%token NONMAGIC
%token SHL
%token SHR
%token EQ
@@ -291,6 +292,11 @@ spell_flags : /* empty */
fail(@1.first_line, @1.first_column, "`LOCAL' specified more than once");
$$ = $2 | SPELL_FLAG_LOCAL;
}
+ | NONMAGIC spell_flags
+ { if ($2 & SPELL_FLAG_NONMAGIC)
+ fail(@1.first_line, @1.first_column, "`NONMAGIC' specified more than once");
+ $$ = $2 | SPELL_FLAG_NONMAGIC;
+ }
| SILENT spell_flags
{ if ($2 & SPELL_FLAG_SILENT)
fail(@1.first_line, @1.first_column, "`SILENT' specified more than once");