@@ -18,10 +18,10 @@ first_line_match: |-
1818
1919variables :
2020 dec_exponent : (?:[eE][-+]?\d*)
21- dec_suffix : ' [dDlL ]'
22- double_suffix : ' [dD ]'
23- long_suffix : ' [lL] '
24- unit_suffix : (?i:[kmgtp]b)
21+ dec_suffix : ' [dD ]'
22+ float_suffix : ' [dDlL ]'
23+ int_suffix : (?i:u[lsy]?|[lnsy])
24+ unit_suffix : (?i:[kmgtp]b\b )
2525 kebab_break : (?![\w-])
2626
2727contexts :
@@ -549,14 +549,14 @@ contexts:
549549 pop : true
550550
551551 numeric-constant :
552- - match : \b(0[bB])([01]*)({{long_suffix }}?{{unit_suffix}}?)\b
552+ - match : \b(0[bB])([01]*)({{int_suffix }}?{{unit_suffix}}?)
553553 scope : meta.number.integer.binary.powershell
554554 captures :
555555 1 : constant.numeric.base.powershell
556556 2 : constant.numeric.value.powershell
557557 3 : constant.numeric.suffix.powershell
558558 push : members
559- - match : \b(0[xX])(\h*)({{long_suffix }}?{{unit_suffix}}?)\b
559+ - match : \b(0[xX])(\h*)({{int_suffix }}?{{unit_suffix}}?)
560560 scope : meta.number.integer.hexadecimal.powershell
561561 captures :
562562 1 : constant.numeric.base.powershell
@@ -571,11 +571,11 @@ contexts:
571571 # 1.2 1.2e-3 1.e2 1e2
572572 | \d+ (?: (\.) \d+ {{dec_exponent}}? | (\.)? {{dec_exponent}} )
573573 )
574- ( {{dec_suffix }}? {{unit_suffix}}? )\b
574+ ( {{float_suffix }}? {{unit_suffix}}? )
575575 |
576576 # 10.l 10.lGB 10.GB
577577 ( \d+ (\.) )
578- ( {{dec_suffix }} {{unit_suffix}}? | {{unit_suffix}} )\b
578+ ( {{float_suffix }} {{unit_suffix}}? | {{unit_suffix}} )
579579 scope: meta.number.float.decimal.powershell
580580 captures:
581581 1: constant.numeric.value.powershell
@@ -587,13 +587,13 @@ contexts:
587587 7: punctuation.separator.decimal.powershell
588588 8: constant.numeric.suffix.powershell
589589 push: members
590- - match : \b(\d+)({{double_suffix }}{{unit_suffix}}?)\b
590+ - match : \b(\d+)({{dec_suffix }}{{unit_suffix}}?)
591591 scope : meta.number.float.decimal.powershell
592592 captures :
593593 1 : constant.numeric.value.powershell
594594 2 : constant.numeric.suffix.powershell
595595 push : members
596- - match : \b(\d+)({{long_suffix }}?{{unit_suffix}}?)\b
596+ - match : \b(\d+)({{int_suffix }}?{{unit_suffix}}?)
597597 scope : meta.number.integer.decimal.powershell
598598 captures :
599599 1 : constant.numeric.value.powershell
0 commit comments