Slightly reworked lexer to for a few directives:

'opt' and several other directives ('printt', 'fail' etc.) no longer causes a syntax error when unquoted.
'include', 'incdir' and 'incbin' and 'output' with '<pathname>' quotes no longer cause syntax error.
This commit is contained in:
2021-08-06 10:06:48 +02:00
parent 2c3daf28f7
commit ddf78ec210
10 changed files with 68 additions and 19 deletions
@@ -22,4 +22,14 @@ internal class OtherDirectivesTest : AbstractParsingTest() {
internal fun if_defined_block(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
testGoodSyntax(testCase, "\tIFD DEBUG ; cause a crash\n illegal\n ENDC\n")
}
@Test
internal fun kalms_include_file_special_quote(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
testGoodSyntax(testCase, " include\t<Engine/A500/System/Copper.i>")
}
@Test
internal fun opt_directive(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
testGoodSyntax(testCase, " opt o+,w-")
}
}