diff --git a/spin2/CHANGELOG.md b/spin2/CHANGELOG.md index 6ddf021..c602675 100644 --- a/spin2/CHANGELOG.md +++ b/spin2/CHANGELOG.md @@ -19,6 +19,18 @@ Possible next additions: - Add new-file templates as Snippets - Add additional Snippets as the community identifies them +## [2.2.3] 2023-11-12 + +Update for P2 only + +- P2 Add new built-in methods LSTRING(), LONGS(), WORDS() and BYTES() to syntax highlighter +- P2 Dialed-in behavior when encountering FlexSpin in-line pasm directives (pasm now highlighted but errors generated for the directives) +- P2 Adjust DOC Generator: don't generate for methods which are commented out! + +Bug fixes for Both P1 and P2 + +- P1 & P2 Repair a couple cases of bitfield highlighting + ## [2.2.2] 2023-11-8 General bug fixes for P2 only (round 2) diff --git a/spin2/client/src/providers/spin.document.generate.ts b/spin2/client/src/providers/spin.document.generate.ts index 2b52adb..c62d7ac 100644 --- a/spin2/client/src/providers/spin.document.generate.ts +++ b/spin2/client/src/providers/spin.document.generate.ts @@ -243,8 +243,8 @@ export class DocGenerator { let line = textEditor.document.lineAt(i); const trimmedLine = line.text.trim(); - // skip all {{ --- }} multi-line doc comments if (currState == eParseState.inMultiLineDocComment) { + // skip all {{ --- }} multi-line doc comments // in multi-line doc-comment, hunt for end '}}' to exit let closingOffset = line.text.indexOf("}}"); if (closingOffset != -1) { @@ -264,8 +264,11 @@ export class DocGenerator { } else if (currState == eParseState.inMultiLineComment) { // skip all { --- } multi-line non-doc comments // in multi-line non-doc-comment, hunt for end '}' to exit - let closingOffset = trimmedLine.indexOf("}"); - if (closingOffset != -1) { + const openingOffset = line.text.indexOf("{"); + let closingOffset = line.text.indexOf("}"); + if (openingOffset != -1 && closingOffset != -1 && openingOffset < closingOffset) { + // do nothing with NESTED {cmt} lines + } else if (closingOffset != -1) { // have close, comment ended currState = priorState; } @@ -297,8 +300,8 @@ export class DocGenerator { } else if (trimmedLine.startsWith("{")) { // process possible multi-line non-doc comment // do we have a close on this same line? - let openingOffset = trimmedLine.indexOf("{"); - const closingOffset = trimmedLine.indexOf("}", openingOffset + 1); + let openingOffset = line.text.indexOf("{"); + const closingOffset = line.text.indexOf("}", openingOffset + 1); if (closingOffset == -1) { // is open of multiline comment priorState = currState; @@ -357,8 +360,11 @@ export class DocGenerator { continue; } else if (currState == eParseState.inMultiLineComment) { // in multi-line non-doc-comment, hunt for end '}' to exit - let closingOffset = trimmedLine.indexOf("}"); - if (closingOffset != -1) { + const openingOffset = line.text.indexOf("{"); + let closingOffset = line.text.indexOf("}"); + if (openingOffset != -1 && closingOffset != -1 && openingOffset < closingOffset) { + // do nothing with NESTED {cmt} lines + } else if (closingOffset != -1) { // have close, comment ended currState = priorState; } @@ -389,8 +395,8 @@ export class DocGenerator { } else if (trimmedLine.startsWith("{")) { // process possible multi-line non-doc comment // do we have a close on this same line? - let openingOffset = trimmedLine.indexOf("{"); - const closingOffset = trimmedLine.indexOf("}", openingOffset + 1); + let openingOffset = line.text.indexOf("{"); + const closingOffset = line.text.indexOf("}", openingOffset + 1); if (closingOffset == -1) { // is open of multiline comment priorState = currState; diff --git a/spin2/package.json b/spin2/package.json index cba4848..992274e 100644 --- a/spin2/package.json +++ b/spin2/package.json @@ -5,7 +5,7 @@ "icon": "images/Propeller.ico", "author": "IronSheep", "license": "MIT", - "version": "2.2.2", + "version": "2.2.3", "repository": { "type": "git", "url": "https://github.com/ironsheep/P2-vscode-langserv-extension" diff --git a/spin2/scripts/LIVE-package.json b/spin2/scripts/LIVE-package.json index cba4848..992274e 100644 --- a/spin2/scripts/LIVE-package.json +++ b/spin2/scripts/LIVE-package.json @@ -5,7 +5,7 @@ "icon": "images/Propeller.ico", "author": "IronSheep", "license": "MIT", - "version": "2.2.2", + "version": "2.2.3", "repository": { "type": "git", "url": "https://github.com/ironsheep/P2-vscode-langserv-extension" diff --git a/spin2/scripts/TEST-package.json b/spin2/scripts/TEST-package.json index eeb58c6..5dcd68c 100644 --- a/spin2/scripts/TEST-package.json +++ b/spin2/scripts/TEST-package.json @@ -4,7 +4,7 @@ "description": "P1 and P2 Spin/Pasm Syntax/Semantic Highlighting w/Code Outline, Object Outline and Custom tabbing support", "author": "IronSheep", "license": "MIT", - "version": "2.2.2", + "version": "2.2.3", "repository": { "type": "git", "url": "https://github.com/ironsheep/P2-vscode-langserv-extension" diff --git a/spin2/server/src/parser/spin1.documentSemanticParser.ts b/spin2/server/src/parser/spin1.documentSemanticParser.ts index aba745d..314aa8b 100644 --- a/spin2/server/src/parser/spin1.documentSemanticParser.ts +++ b/spin2/server/src/parser/spin1.documentSemanticParser.ts @@ -33,7 +33,7 @@ export class Spin1DocumentSemanticParser { private bLogStarted: boolean = false; // adjust following true/false to show specific parsing debug - private spin1DebugLogEnabled: boolean = true; // WARNING (REMOVE BEFORE FLIGHT)- change to 'false' - disable before commit + private spin1DebugLogEnabled: boolean = false; // WARNING (REMOVE BEFORE FLIGHT)- change to 'false' - disable before commit private showSpinCode: boolean = true; private showPreProc: boolean = true; private showCON: boolean = true; diff --git a/spin2/server/src/parser/spin2.documentSemanticParser.ts b/spin2/server/src/parser/spin2.documentSemanticParser.ts index a338530..bf9e162 100644 --- a/spin2/server/src/parser/spin2.documentSemanticParser.ts +++ b/spin2/server/src/parser/spin2.documentSemanticParser.ts @@ -41,7 +41,7 @@ export class Spin2DocumentSemanticParser { private bLogStarted: boolean = false; // adjust following true/false to show specific parsing debug - private spin2DebugLogEnabled: boolean = true; // WARNING (REMOVE BEFORE FLIGHT)- change to 'false' - disable before commit + private spin2DebugLogEnabled: boolean = false; // WARNING (REMOVE BEFORE FLIGHT)- change to 'false' - disable before commit private showSpinCode: boolean = true; private showPreProc: boolean = true; private showCON: boolean = true;