'END' detection was breaking parsing, causing havoc.
This commit is contained in:
@@ -871,11 +871,7 @@ public class _M68kLexer implements FlexLexer {
|
||||
yybegin(ASMINSTR);
|
||||
return MNEMONIC;
|
||||
}
|
||||
if (isEndDirective(yytext())) {
|
||||
yybegin(YYINITIAL);
|
||||
zzAtEOF = true;
|
||||
return null;
|
||||
}
|
||||
//if(isEndDirective(yytext())) { yybegin(YYINITIAL); zzAtEOF = true; return null; }
|
||||
if (isDataDirective(yytext())) {
|
||||
startExpr(EXPR, EXPR_OP);
|
||||
return DATA_DIRECTIVE;
|
||||
|
||||
@@ -117,7 +117,7 @@ PLAIN_MACRO_LINE=[^;\r\n]+
|
||||
{DIRECTIVE_KEYWORD} {
|
||||
if(isAsmMnemonicWithSize(yytext())) { yybegin(ASMINSTR); yypushback(2); return MNEMONIC; }
|
||||
if(isAsmMnemonic(yytext())) { yybegin(ASMINSTR); return MNEMONIC; }
|
||||
if(isEndDirective(yytext())) { yybegin(YYINITIAL); zzAtEOF = true; return null; }
|
||||
//if(isEndDirective(yytext())) { yybegin(YYINITIAL); zzAtEOF = true; return null; }
|
||||
if(isDataDirective(yytext())) { startExpr(EXPR, EXPR_OP); return DATA_DIRECTIVE; }
|
||||
if(isPlainDirective(yytext())) { yybegin(PLAINPARAMS); return OTHER_DIRECTIVE; }
|
||||
if(isOtherDirective(yytext())) { startExpr(EXPR, EXPR_OP); return OTHER_DIRECTIVE; }
|
||||
|
||||
@@ -3,12 +3,14 @@ package de.platon42.intellij.plugins.m68k.parser
|
||||
import de.platon42.intellij.jupiter.MyTestCase
|
||||
import de.platon42.intellij.jupiter.ParsingTestExtension
|
||||
import de.platon42.intellij.jupiter.TestDataSubPath
|
||||
import org.junit.jupiter.api.Disabled
|
||||
import org.junit.jupiter.api.Test
|
||||
|
||||
@TestDataSubPath("directives")
|
||||
internal class EndDirectiveTest : AbstractParsingTest() {
|
||||
|
||||
@Test
|
||||
@Disabled("END directive detection breaks stuff, need to find a different solution")
|
||||
internal fun end_directive(@MyTestCase testCase: ParsingTestExtension.IParsingTestCase) {
|
||||
testGoodSyntax(
|
||||
testCase, """
|
||||
|
||||
Reference in New Issue
Block a user