From 3e6232e9d09ce7852255ff6e0b8788ff2ba968d8 Mon Sep 17 00:00:00 2001 From: Bryan Cuneo Date: Thu, 29 Oct 2026 09:35:34 -0500 Subject: [PATCH 1/5] Added '.vscode/' to .gitignore' --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8930eaf..56b2d86 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ syntaxes/ grammars/ node_modules/ atom/ -atom.zip \ No newline at end of file +atom.zip +.vscode/ From 7396a71c5ab3a2fd2b1f710d816721c5fcd09014 Mon Sep 17 00:00:00 2001 From: Bryan Cuneo Date: Thu, 29 Oct 2026 10:10:17 -0500 Subject: [PATCH 2/5] Changed '$error' to scope 'support.variable.automatic.powershell' --- PowerShellSyntax.tmLanguage | 4 ++-- spec/testfiles/syntax_test_TheBigTestFile.ps1 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PowerShellSyntax.tmLanguage b/PowerShellSyntax.tmLanguage index ed2ddf0..c0810e5 100644 --- a/PowerShellSyntax.tmLanguage +++ b/PowerShellSyntax.tmLanguage @@ -1023,7 +1023,7 @@ comment These are the other built-in constants. match - (\$)(?i:(Error|ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b + (\$)(?i:(ExecutionContext|Host|Home|PID|PsHome|PsVersionTable|ShellID))((?:\.(?:\p{L}|\d|_)+)*\b)?\b captures @@ -1047,7 +1047,7 @@ comment Automatic variables are not constants, but they are read-only. In monokai (default) color schema support.variable doesn't have color, so we use constant. match - (\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\d|_)+)*\b)? + (\$)((?:[$^?])|(?i:_|Args|ConsoleFileName|Error|Event|EventArgs|EventSubscriber|ForEach|Input|LastExitCode|Matches|MyInvocation|NestedPromptLevel|Profile|PSBoundParameters|PsCmdlet|PsCulture|PSDebugContext|PSItem|PSCommandPath|PSScriptRoot|PsUICulture|Pwd|Sender|SourceArgs|SourceEventArgs|StackTrace|Switch|This)\b)((?:\.(?:\p{L}|\d|_)+)*\b)? captures diff --git a/spec/testfiles/syntax_test_TheBigTestFile.ps1 b/spec/testfiles/syntax_test_TheBigTestFile.ps1 index 7c06e18..bbe72b8 100644 --- a/spec/testfiles/syntax_test_TheBigTestFile.ps1 +++ b/spec/testfiles/syntax_test_TheBigTestFile.ps1 @@ -113,7 +113,7 @@ $args # ^ support.variable.automatic.powershell $error # <- punctuation.definition.variable.powershell -# ^ support.constant.variable.powershell +# ^ support.variable.automatic.powershell $home # <- punctuation.definition.variable.powershell # ^ support.constant.variable.powershell From 0e55e8ad14e8875a86726ae8af16e795e5e87987 Mon Sep 17 00:00:00 2001 From: Bryan Cuneo Date: Thu, 29 Oct 2026 10:17:39 -0500 Subject: [PATCH 3/5] $home test now appropriately checks for scope 'variable.other.constant.powershell' --- spec/testfiles/syntax_test_TheBigTestFile.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spec/testfiles/syntax_test_TheBigTestFile.ps1 b/spec/testfiles/syntax_test_TheBigTestFile.ps1 index bbe72b8..a207b6b 100644 --- a/spec/testfiles/syntax_test_TheBigTestFile.ps1 +++ b/spec/testfiles/syntax_test_TheBigTestFile.ps1 @@ -114,13 +114,15 @@ $args $error # <- punctuation.definition.variable.powershell # ^ support.variable.automatic.powershell -$home -# <- punctuation.definition.variable.powershell -# ^ support.constant.variable.powershell $foreach # <- punctuation.definition.variable.powershell # ^ support.variable.automatic.powershell +# Automatic constants +$home +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell + # Normal variables $variable # <- punctuation.definition.variable.powershell From 242a314a5299cd938d969c717d5a891835726c97 Mon Sep 17 00:00:00 2001 From: Bryan Cuneo Date: Thu, 29 Oct 2026 10:21:55 -0500 Subject: [PATCH 4/5] Added tests for the rest of the automatic constants in scope 'variable.other.constant.powershell' --- spec/testfiles/syntax_test_TheBigTestFile.ps1 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/spec/testfiles/syntax_test_TheBigTestFile.ps1 b/spec/testfiles/syntax_test_TheBigTestFile.ps1 index a207b6b..6f3b7e1 100644 --- a/spec/testfiles/syntax_test_TheBigTestFile.ps1 +++ b/spec/testfiles/syntax_test_TheBigTestFile.ps1 @@ -119,9 +119,27 @@ $foreach # ^ support.variable.automatic.powershell # Automatic constants +$executioncontext +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell +$host +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell $home # <- punctuation.definition.variable.powershell # ^ variable.other.constant.powershell +$pid +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell +$pshome +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell +$psversiontable +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell +$shellid +# <- punctuation.definition.variable.powershell +# ^ variable.other.constant.powershell # Normal variables $variable From 497be24631353346487ad9f719077a1ec5a53fcf Mon Sep 17 00:00:00 2001 From: Bryan Cuneo Date: Thu, 29 Oct 2026 10:25:03 -0500 Subject: [PATCH 5/5] Built tests with latest NodeJS LTS release - v26; updated lock file format --- package-lock.json | 39 +++++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index e75d8ea..037921e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,29 +1,48 @@ { "name": "EditorSyntax", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 3, "requires": true, - "dependencies": { - "atom-grammar-test": { + "packages": { + "": { + "name": "EditorSyntax", + "version": "1.0.0", + "license": "MIT", + "dependencies": { + "atom-grammar-test": "^0.6.3", + "fast-plist": "0.1.2" + }, + "engines": { + "atom": "*", + "node": "*" + } + }, + "node_modules/atom-grammar-test": { "version": "0.6.4", "resolved": "https://registry.npmjs.org/atom-grammar-test/-/atom-grammar-test-0.6.4.tgz", "integrity": "sha1-2KU1A9H+k5mX9Ji3SirDEARKfU4=", - "requires": { - "chevrotain": "0.18.0", - "escape-string-regexp": "1.0.5" + "dependencies": { + "chevrotain": "^0.18.0", + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "atom": ">=1.0.0 <2.0.0" } }, - "chevrotain": { + "node_modules/chevrotain": { "version": "0.18.0", "resolved": "https://registry.npmjs.org/chevrotain/-/chevrotain-0.18.0.tgz", "integrity": "sha1-sodxTjFZC64sXR4vYRZz7+xHnYA=" }, - "escape-string-regexp": { + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=" + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "engines": { + "node": ">=0.8.0" + } }, - "fast-plist": { + "node_modules/fast-plist": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/fast-plist/-/fast-plist-0.1.2.tgz", "integrity": "sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg="