diff --git a/spin2/CHANGELOG.md b/spin2/CHANGELOG.md index 90d685b..7b7d820 100644 --- a/spin2/CHANGELOG.md +++ b/spin2/CHANGELOG.md @@ -18,11 +18,17 @@ Possible next additions: - Add new-file templates as Snippets - Add additional Snippets as the community identifies them +## [2.2.17] 2024-05-?? + +Update P2 Only + +- BUGFIX: parsing repair detection of alignl/alignw in VAR Issue(#9) + ## [2.2.16] 2024-04-14 Update P2 Only -- BUGFIX: Syntax: add missing bytefit/wordfit recodnition in DAT blocks (#6) +- BUGFIX: Syntax: add missing bytefit/wordfit recognition in DAT blocks (#6) - BUGFIX: Semantic: repair handling of {Spin2_v??} built-in method name support - BUGFIX: File access issues on Windows (11?) repaired - Cleaned up the code-fold detection... now handling ORG* forms better diff --git a/spin2/TEST_LANG_SERVER/spin2/240509-fixes.spin2 b/spin2/TEST_LANG_SERVER/spin2/240509-fixes.spin2 new file mode 100644 index 0000000..5762a87 --- /dev/null +++ b/spin2/TEST_LANG_SERVER/spin2/240509-fixes.spin2 @@ -0,0 +1,11 @@ +' reported issue #9 +CON + + MAX_PATH = 4 + +VAR + alignl + long repeatkey,repeatnext + + alignl + byte curdir[MAX_PATH+1],tmppath[MAX_PATH+1] diff --git a/spin2/server/src/parser/spin2.documentSemanticParser.ts b/spin2/server/src/parser/spin2.documentSemanticParser.ts index d1cd8a3..ed5d0ac 100644 --- a/spin2/server/src/parser/spin2.documentSemanticParser.ts +++ b/spin2/server/src/parser/spin2.documentSemanticParser.ts @@ -64,7 +64,7 @@ export class Spin2DocumentSemanticParser { private bLogStarted: boolean = false; // adjust following true/false to show specific parsing debug - private isDebugLogEnabled: boolean = false; // WARNING (REMOVE BEFORE FLIGHT)- change to 'false' - disable before commit + private isDebugLogEnabled: boolean = true; // WARNING (REMOVE BEFORE FLIGHT)- change to 'false' - disable before commit private showSpinCode: boolean = true; private showPreProc: boolean = true; private showCON: boolean = true; @@ -2048,7 +2048,7 @@ export class Spin2DocumentSemanticParser { this._logVAR(` -- GLBL GetVarDecl adjust longVarName:[${newName}] -> [${tempParts[0]}]`); newName = tempParts[0]; } - if (newName.charAt(0).match(/[a-zA-Z_]/)) { + if (newName.charAt(0).match(/[a-zA-Z_]/) && !this.parseUtils.isAlignType(newName)) { this._logVAR(` -- GLBL GetVarDecl w/type newName=[${newName}]`); const nameOffset = line.indexOf(newName, currentOffset); // FIXME: UNDONE, do we have to dial this in? const referenceDetails: RememberedToken | undefined = this.semanticFindings.getGlobalToken(newName); @@ -2080,7 +2080,7 @@ export class Spin2DocumentSemanticParser { this._logVAR(` -- GLBL GetVarDecl adjust longVarName:[${longVarName}] -> [${tempParts[0]}]`); longVarName = tempParts[0]; } - if (longVarName.charAt(0).match(/[a-zA-Z_]/)) { + if (longVarName.charAt(0).match(/[a-zA-Z_]/) && !this.parseUtils.isAlignType(longVarName)) { this._logVAR(` -- GLBL GetVarDecl w/o type newName=[${longVarName}]`); const nameOffset = line.indexOf(longVarName, currentOffset); // FIXME: UNDONE, do we have to dial this in? const referenceDetails: RememberedToken | undefined = this.semanticFindings.getGlobalToken(longVarName);