File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -837,6 +837,8 @@ contexts:
837837 - match : \]
838838 scope : punctuation.section.brackets.end.powershell
839839 pop : 1
840+ - match : \b(?:in|out|ref)\b
841+ scope : storage.modifier.powershell
840842 - match : \p{L}[\p{L}\p{N}]+(\.)
841843 scope : meta.generic-name.powershell
842844 captures :
Original file line number Diff line number Diff line change @@ -2451,3 +2451,20 @@ function Process-DeploymentConfig {
24512451 Resolve-ConfigPath - Path " Foo" - PathVariables $PathVariables
24522452# @@@@@@@@@@@@@@@@@@ reference
24532453}
2454+
2455+ # https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_ref?view=powershell-7.6
2456+ # Create a value type variable.
2457+ $i = 0
2458+ # Create a reference type variable.
2459+ $iRef = [ref ]0
2460+ # ^^^ storage.modifier.powershell
2461+ # Invoke a scriptblock to attempt to change both values.
2462+ & {$i ++ ;$iRef.Value ++ }
2463+ # Output the results.
2464+ " `$ i = $i ;`$ iRef = $ ( $iRef.Value ) "
2465+
2466+ [int ]::TryParse(" 15" , ([ref ]$number ))
2467+ # ^^^ storage.type.powershell
2468+ # ^^ punctuation.accessor.double-colon.powershell
2469+ # @@@@@@@@ reference
2470+ # ^^^ storage.modifier.powershell
You can’t perform that action at this time.
0 commit comments