Skip to content

Commit

Permalink
Better error message for malformed NIL ops
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan O'Rear committed Jul 13, 2010
1 parent f9a7172 commit 919c9fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Niecza/Grammar.pm6
Expand Up @@ -27,7 +27,13 @@ grammar Q is STD::Q {
# mnemonic characters: (@, !, =) fetch, store, lvalue.
# (l) lexical (L) raw lexical
grammar NIL is STD {
rule nibbler { [ <insn> ]* }
rule nibbler {
[
|| <insn>
|| <?stopper>
|| <.panic: "Malformed NIL instruction">
]*
}

token category:insn { <sym> }
proto token insn { <...> }
Expand Down

0 comments on commit 919c9fe

Please sign in to comment.