parser: handle "control verbs" without close paren

This commit is contained in:
Justin Viiret 2017-02-03 11:39:06 +11:00 committed by Matthew Barr
parent 084596bb5e
commit 1245156f44
2 changed files with 4 additions and 0 deletions

View File

@ -569,6 +569,9 @@ unichar readUtf8CodePoint4c(const char *s) {
assert(0); // Should have thrown a parse error.
throw LocatedParseError("Unknown control verb");
};
any => {
throw LocatedParseError("Unknown control verb");
};
*|;
#############################################################

View File

@ -135,3 +135,4 @@
138:/(*UNKNOWNVERB)foobar/ #Unknown control verb (*UNKNOWNVERB) at index 0.
139:/foo(*UTF8)bar/ #(*UTF8) must be at start of expression, encountered at index 5.
140:/(?i)(*UTF8)foobar/ #(*UTF8) must be at start of expression, encountered at index 6.
141:/(*@&/ #Unknown control verb at index 2.