Skip to content

Commit 6b87cb5

Browse files
committed
Merge branch 'master' into function-and-method-meta
* master: Fix syntax test action (SublimeText#190) (Re-)add PowerShell 6+ number suffixes
2 parents 3ccedeb + a243f8b commit 6b87cb5

File tree

3 files changed

+244
-113
lines changed

3 files changed

+244
-113
lines changed

Diff for: .github/workflows/syntax.yml

+16-4
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,42 @@
11
name: Syntax Tests
22

33
on:
4+
45
push:
6+
branches:
7+
- '**'
8+
tags-ignore:
9+
- '**'
510
paths:
11+
- '.github/workflows/syntax.yml'
612
- '**.sublime-syntax'
713
- '**/syntax_test*'
814
- '**.tmPreferences'
915
pull_request:
1016
paths:
17+
- '.github/workflows/syntax.yml'
1118
- '**.sublime-syntax'
1219
- '**/syntax_test*'
1320
- '**.tmPreferences'
21+
types:
22+
- "opened"
23+
- "reopened"
24+
- "synchronize"
25+
workflow_dispatch:
1426

1527
jobs:
1628
main:
1729
name: Syntax Tests (${{ matrix.build }})
1830
strategy:
1931
matrix:
2032
include:
21-
- build: 3211
22-
packages: st3
23-
- build: 4102
33+
- build: 4107
34+
packages: v4107
35+
- build: latest
2436
packages: master
2537
runs-on: ubuntu-latest
2638
steps:
27-
- uses: actions/checkout@v2
39+
- uses: actions/checkout@v4
2840
- uses: SublimeText/syntax-test-action@v2
2941
with:
3042
build: ${{ matrix.build }}

Diff for: PowerShell.sublime-syntax

+10-10
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ first_line_match: |-
1818
1919
variables:
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

2727
contexts:
@@ -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

Comments
 (0)