From 91d2c7fd01d646731a581115b110239fda545db7 Mon Sep 17 00:00:00 2001 From: Michael Lyons Date: Fri, 17 Jul 2026 14:56:54 -0400 Subject: [PATCH 1/2] Drop project file from tracking --- .gitignore | 1 + PowerShell.sublime-project | 9 --------- 2 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 PowerShell.sublime-project diff --git a/.gitignore b/.gitignore index 12dd925f..e3c9d297 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # Editor files *.sublime-workspace +*.sublime-project # Other .idea diff --git a/PowerShell.sublime-project b/PowerShell.sublime-project deleted file mode 100644 index 9d0052ba..00000000 --- a/PowerShell.sublime-project +++ /dev/null @@ -1,9 +0,0 @@ -{ - "folders": - [ - { - "follow_symlinks": true, - "path": ".", - }, - ], -} From 97ad5f6f0902cdb2867b4c9b9d2346c8a384c6e3 Mon Sep 17 00:00:00 2001 From: Michael Lyons Date: Fri, 17 Jul 2026 15:10:13 -0400 Subject: [PATCH 2/2] Set in/out/ref to storage modifiers --- PowerShell.sublime-syntax | 2 ++ tests/syntax_test_PowerShell.ps1 | 17 +++++++++++++++++ 2 files changed, 19 insertions(+) diff --git a/PowerShell.sublime-syntax b/PowerShell.sublime-syntax index 89793720..b568e5d4 100644 --- a/PowerShell.sublime-syntax +++ b/PowerShell.sublime-syntax @@ -837,6 +837,8 @@ contexts: - match: \] scope: punctuation.section.brackets.end.powershell pop: 1 + - match: \b(?:in|out|ref)\b + scope: storage.modifier.powershell - match: \p{L}[\p{L}\p{N}]+(\.) scope: meta.generic-name.powershell captures: diff --git a/tests/syntax_test_PowerShell.ps1 b/tests/syntax_test_PowerShell.ps1 index 5929af5f..96a4e108 100644 --- a/tests/syntax_test_PowerShell.ps1 +++ b/tests/syntax_test_PowerShell.ps1 @@ -2451,3 +2451,20 @@ function Process-DeploymentConfig { Resolve-ConfigPath -Path "Foo" -PathVariables $PathVariables # @@@@@@@@@@@@@@@@@@ reference } + + # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ref?view=powershell-7.6 + # Create a value type variable. + $i = 0 + # Create a reference type variable. + $iRef = [ref]0 +# ^^^ storage.modifier.powershell + # Invoke a scriptblock to attempt to change both values. + &{$i++;$iRef.Value++} + # Output the results. + "`$i = $i;`$iRef = $($iRef.Value)" + + [int]::TryParse("15", ([ref]$number)) +# ^^^ storage.type.powershell +# ^^ punctuation.accessor.double-colon.powershell +# @@@@@@@@ reference +# ^^^ storage.modifier.powershell