diff --git a/spin2/.vscode/settings.json b/spin2/.vscode/settings.json index 0dee814..45ea199 100644 --- a/spin2/.vscode/settings.json +++ b/spin2/.vscode/settings.json @@ -3,8 +3,8 @@ "typescript.tsc.autoDetect": "off", "typescript.preferences.quoteStyle": "single", "editor.codeActionsOnSave": { - "source.fixAll.eslint": true - }, + "source.fixAll.eslint": "explicit" +}, "files.exclude": { "**/.git": true, "**/.svn": true, diff --git a/spin2/CHANGELOG.md b/spin2/CHANGELOG.md index f54e893..9539132 100644 --- a/spin2/CHANGELOG.md +++ b/spin2/CHANGELOG.md @@ -18,6 +18,12 @@ Possible next additions: - Add new-file templates as Snippets - Add additional Snippets as the community identifies them +## [2.2.9] 2023-12-11 + +Update P2 Only + +- Fixes to SPIN2 object constant override highlight. (was broken in earlier release) + ## [2.2.8] 2023-12-05 Update P1 and P2 diff --git a/spin2/package.json b/spin2/package.json index 041e437..77b2668 100644 --- a/spin2/package.json +++ b/spin2/package.json @@ -5,7 +5,7 @@ "icon": "images/Propeller.ico", "author": "IronSheep", "license": "MIT", - "version": "2.2.8", + "version": "2.2.9", "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 041e437..77b2668 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.8", + "version": "2.2.9", "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 3577fda..828f6e3 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.8", + "version": "2.2.9", "repository": { "type": "git", "url": "https://github.com/ironsheep/P2-vscode-langserv-extension" diff --git a/spin2/server/src/parser/spin2.documentSemanticParser.ts b/spin2/server/src/parser/spin2.documentSemanticParser.ts index 4a088f8..bc8c221 100644 --- a/spin2/server/src/parser/spin2.documentSemanticParser.ts +++ b/spin2/server/src/parser/spin2.documentSemanticParser.ts @@ -6322,12 +6322,14 @@ export class Spin2DocumentSemanticParser { const dottedSymbolRegex = /[a-zA-Z0-9_]\.[a-zA-Z_]/; // sym.sym const dottedIndexedSymbolRegex = /[a-zA-Z0-9_]\]\.[a-zA-Z_]/; // sym#sym const hashedSymbolRegex = /[a-zA-Z0-9_]\#[a-zA-Z_]/; // sym#sym + const percentSymbolRegex = /[a-zA-Z0-9_]\%[a-zA-Z_]/; // sym#sym const hasSymbolDotSymbol: boolean = dottedSymbolRegex.test(possibleRef); const hasSymbolHashSymbol: boolean = hashedSymbolRegex.test(possibleRef); + const hasPercentHashSymbol: boolean = percentSymbolRegex.test(possibleRef); const hasSymbolDOtIndexedSymbol: boolean = dottedIndexedSymbolRegex.test(possibleRef); const possibleRefLC: string = possibleRef.toLowerCase(); const isPartialVariableAccess: boolean = possibleRefLC.includes(".byte[") || possibleRefLC.includes(".word[") || possibleRefLC.includes(".long["); - const refFoundStatus: boolean = !possibleRef.startsWith(".") && !isPartialVariableAccess && (hasSymbolDOtIndexedSymbol || hasSymbolDotSymbol || hasSymbolHashSymbol); + const refFoundStatus: boolean = !possibleRef.startsWith(".") && !isPartialVariableAccess && (hasSymbolDOtIndexedSymbol || hasSymbolDotSymbol || hasSymbolHashSymbol || hasPercentHashSymbol); this._logMessage(` -- isObjRef() possibleRef=[${possibleRef}] -> (${refFoundStatus})`); return refFoundStatus; }