Improve parsing of % followed immediately by identifier
If it's not a recognised directive the scanner now emits MODULO and then rescans what follows, and if the parser then gives a syntax error we report it as an unknown directive. This means that `a%b` is now allowed in an expression, and that things like `%std::vector<std::string>` now give an error rather than being quietly ignored. Fixes #300 Fixes #368
This commit is contained in:
parent
fd6c0255a2
commit
a7ff0da1f3
7 changed files with 43 additions and 7 deletions
|
|
@ -1 +1 @@
|
|||
pp_unknowndirective.i:12: Error: Unknown directive '%remane'.
|
||||
pp_unknowndirective.i:7: Error: Unknown directive '%remane'.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue