diff --git a/README.md b/README.md index 989f04c..c0bdebc 100644 --- a/README.md +++ b/README.md @@ -85,11 +85,15 @@ weak warnings as missing macro evaluation will not resolve symbols defined via ` ### Documentation provider -#### M68kSymbolDefinitionDocumentationProvider +#### M68kSymbolDefinition Provides the assigned value of a `=`, `set` or `equ` symbol definition when hovering over a symbol. -#### M68kRegisterFlowDocumentationProvider +#### M68kGlobalLabel + +Shows the comments above the label and if the first statement after the label is a directive like `include` or `dc.b`, shows it, too. + +#### M68kRegisterFlow When hovering over or placing the cursor at a data or address register, the documentation will scan through the instructions backwards and forwards and will show all read, changes of the register contents. It does this until an instruction is found that defines (sets) the contents of the register @@ -100,7 +104,7 @@ The analysis ignores all code flow instructions and might be inaccurate for bran The documentation will search up to 100 instructions in each direction, but only four when hovering over the register (so if you need the whole analysis, use the documentation window). -#### M68kInstructionDocumentationProvider +#### M68kInstruction When hovering over a mnemonic, it will show a short description of the assembly instruction. @@ -112,7 +116,7 @@ If the current statement has no valid syntax, the instruction details of all mat ## Known issues - `Find Usages` always shows _"Unclassified"_ though it shouldn't (?) -- Typing in the `END` keyword will sometimes mess up the parsing for the next tokens. +- `END` detection was breaking parsing, so this is disabled for now until I find a working solution. - Macro invocations are not yet evaluated, thus no referencing to symbols defined via macros (e.g. `STRUCT`). - Scoping for global symbols and labels is currently the whole project. - No support for register replacement (e.g. registers replaced by `EQUR` or `EQURL` will cause syntax errors) @@ -159,6 +163,7 @@ are appreciated. It really is keeping me motivated to continue development. - Enhancement: Documentation for instruction with special register shows specific register expected. - New: Added documentation provider info for global labels. Shows directives and comments above. - Bugfix: Fixed BNF for labels with preprocessor statements. +- Disabled: `END` detection was breaking parsing, causing havoc. ### V0.6 (09-Aug-21) diff --git a/build.gradle b/build.gradle index b9b3ab3..a80543d 100644 --- a/build.gradle +++ b/build.gradle @@ -67,6 +67,7 @@ patchPluginXml {
  • Enhancement: Documentation for instruction with special register shows specific register expected.
  • New: Added documentation provider info for global labels. Shows directives and comments above.
  • Bugfix: Fixed BNF for labels with preprocessor statements. +
  • Disabled: 'END' detection was breaking parsing, causing havoc.

    Full changelog available at Github project site.

    """) diff --git a/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java b/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java index 987efed..784bbb0 100644 --- a/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java +++ b/src/main/gen/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.java @@ -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; diff --git a/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex b/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex index c4878e1..1a090bf 100644 --- a/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex +++ b/src/main/java/de/platon42/intellij/plugins/m68k/lexer/_M68kLexer.flex @@ -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; } diff --git a/src/test/java/de/platon42/intellij/plugins/m68k/parser/EndDirectiveTest.kt b/src/test/java/de/platon42/intellij/plugins/m68k/parser/EndDirectiveTest.kt index 33a65f4..cf36477 100644 --- a/src/test/java/de/platon42/intellij/plugins/m68k/parser/EndDirectiveTest.kt +++ b/src/test/java/de/platon42/intellij/plugins/m68k/parser/EndDirectiveTest.kt @@ -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, """