diff --git a/package-lock.json b/package-lock.json index f4c3dff3..86022bc2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "hasInstallScript": true, "license": "MIT", "dependencies": { + "@rokucommunity/logger": "^0.3.9", "@types/request": "^2.48.12", "@vscode/extension-telemetry": "^0.4.7", "array-sort": "^1.0.0", @@ -10898,9 +10899,9 @@ } }, "node_modules/vscode-languageserver-textdocument": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.11.tgz", - "integrity": "sha512-X+8T3GoiwTVlJbicx/sIAF+yuJAqz8VvwJyoMVhwEMoEKE/fkDmrqUgDMyBECcM2A2frVZIUj5HI/ErRXCfOeA==" + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/vscode-languageserver-textdocument/-/vscode-languageserver-textdocument-1.0.12.tgz", + "integrity": "sha512-cxWNPesCnQCcMPeenjKKsOCKQZ/L6Tv19DTRIGuLWe32lyzWhihGVJ/rcckZXJxfdKCFvRLS3fpBIsV/ZGX4zA==" }, "node_modules/vscode-languageserver-types": { "version": "3.16.0", diff --git a/package.json b/package.json index bb147d71..778372b8 100644 --- a/package.json +++ b/package.json @@ -52,6 +52,7 @@ "sync-launch-settings": "ts-node scripts/sync-launch-settings.ts" }, "dependencies": { + "@rokucommunity/logger": "^0.3.9", "@types/request": "^2.48.12", "@vscode/extension-telemetry": "^0.4.7", "array-sort": "^1.0.0", diff --git a/src/grammar/brightscript.tmLanguage.spec.ts b/src/grammar/brightscript.tmLanguage.spec.ts index 08e28166..aa31da12 100644 --- a/src/grammar/brightscript.tmLanguage.spec.ts +++ b/src/grammar/brightscript.tmLanguage.spec.ts @@ -6,6 +6,31 @@ import { standardizePath as s } from 'brighterscript'; const brightscriptTmlanguagePath = s`${__dirname}/../../syntaxes/brightscript.tmLanguage.json`; describe('brightscript.tmlanguage.json', () => { + it('colors m, m.top, m.global, and super correctly', async () => { + await testGrammar(` + super.doSomething() + '^^^^^ keyword.other.this.brs + `); + + await testGrammar(` + this = m + ' ^ keyword.other.this.brs + '^^^^ entity.name.variable.local.brs + `); + + await testGrammar(` + m.global = true + ' ^^^^^^ keyword.other.this.brs + '^ keyword.other.this.brs + `); + + await testGrammar(` + m.top.visible = true + ' ^^^ keyword.other.this.brs + '^ keyword.other.this.brs + `); + }); + it('colors alias statement properly', async () => { await testGrammar(` alias alpha = beta diff --git a/syntaxes/brightscript.tmLanguage.json b/syntaxes/brightscript.tmLanguage.json index eae517a4..b52646a7 100644 --- a/syntaxes/brightscript.tmLanguage.json +++ b/syntaxes/brightscript.tmLanguage.json @@ -652,9 +652,12 @@ "captures": { "1": { "name": "keyword.other.this.brs" + }, + "2": { + "name": "keyword.other.this.brs" } }, - "match": "(?i:(?