Fixed syntax error for files ending on non-empty line

This commit is contained in:
2021-07-26 10:59:40 +02:00
parent 3165d99fc2
commit 82feb8c43c
6 changed files with 30 additions and 13 deletions
@@ -13,13 +13,14 @@ internal class BasicAsmInstTest : AbstractParsingTest() {
@ParserResultFile("basic_block_of_code")
internal fun parser_can_parse_basic_block_of_code(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
testGoodSyntax(
testCase, "\tadd.l d0,d0\n"
+ "\tmoveq #10,d1\n"
+ " rts\n"
+ "\n"
+ "; comment\n"
+ " jmp\tresetcode ; unreachable\n"
+ " \n"
testCase, "\tadd.l d0,d0\n"
+ "\tmoveq #10,d1\n"
+ " rts\n"
+ "\n"
+ "; comment\n"
+ " jmp\tresetcode ; unreachable\n"
+ " \n"
+ "eoflabel"
)
}
}
@@ -53,4 +53,7 @@ Assembly File: a.asm
PsiComment(M68kTokenType.COMMENT)('; unreachable')
PsiElement(M68kTokenType.EOL)('\n')
PsiWhiteSpace(' ')
PsiWhiteSpace('\n')
PsiWhiteSpace('\n')
M68kStatementImpl(STATEMENT)
M68kGlobalLabelImpl(GLOBAL_LABEL)
PsiElement(M68kTokenType.GLOBAL_LABEL_DEF)('eoflabel')