@salesforce/apex-tmlanguage 1.8.3 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3588,6 +3588,10 @@
3588
3588
  <key>include</key>
3589
3589
  <string>#numeric-literal</string>
3590
3590
  </dict>
3591
+ <dict>
3592
+ <key>include</key>
3593
+ <string>#multiline-string-literal</string>
3594
+ </dict>
3591
3595
  <dict>
3592
3596
  <key>include</key>
3593
3597
  <string>#string-literal</string>
@@ -3679,12 +3683,48 @@
3679
3683
  </dict>
3680
3684
  </array>
3681
3685
  </dict>
3686
+ <key>multiline-string-literal</key>
3687
+ <dict>
3688
+ <key>name</key>
3689
+ <string>string.quoted.single.multiline.apex</string>
3690
+ <key>begin</key>
3691
+ <string>'''</string>
3692
+ <key>beginCaptures</key>
3693
+ <dict>
3694
+ <key>0</key>
3695
+ <dict>
3696
+ <key>name</key>
3697
+ <string>punctuation.definition.string.begin.apex</string>
3698
+ </dict>
3699
+ </dict>
3700
+ <key>end</key>
3701
+ <string>'''</string>
3702
+ <key>endCaptures</key>
3703
+ <dict>
3704
+ <key>0</key>
3705
+ <dict>
3706
+ <key>name</key>
3707
+ <string>punctuation.definition.string.end.apex</string>
3708
+ </dict>
3709
+ </dict>
3710
+ <key>patterns</key>
3711
+ <array>
3712
+ <dict>
3713
+ <key>include</key>
3714
+ <string>#string-character-escape</string>
3715
+ </dict>
3716
+ <dict>
3717
+ <key>include</key>
3718
+ <string>#string-template-expression</string>
3719
+ </dict>
3720
+ </array>
3721
+ </dict>
3682
3722
  <key>string-literal</key>
3683
3723
  <dict>
3684
3724
  <key>name</key>
3685
3725
  <string>string.quoted.single.apex</string>
3686
3726
  <key>begin</key>
3687
- <string>'</string>
3727
+ <string>\'(?!'')</string>
3688
3728
  <key>beginCaptures</key>
3689
3729
  <dict>
3690
3730
  <key>0</key>
@@ -3714,6 +3754,10 @@
3714
3754
  <key>include</key>
3715
3755
  <string>#string-character-escape</string>
3716
3756
  </dict>
3757
+ <dict>
3758
+ <key>include</key>
3759
+ <string>#string-template-expression</string>
3760
+ </dict>
3717
3761
  </array>
3718
3762
  </dict>
3719
3763
  <key>string-character-escape</key>
@@ -3723,6 +3767,40 @@
3723
3767
  <key>match</key>
3724
3768
  <string>\\.</string>
3725
3769
  </dict>
3770
+ <key>string-template-expression</key>
3771
+ <dict>
3772
+ <key>name</key>
3773
+ <string>meta.template-expression.apex</string>
3774
+ <key>begin</key>
3775
+ <string>\$\{</string>
3776
+ <key>beginCaptures</key>
3777
+ <dict>
3778
+ <key>0</key>
3779
+ <dict>
3780
+ <key>name</key>
3781
+ <string>punctuation.definition.template-expression.begin.apex</string>
3782
+ </dict>
3783
+ </dict>
3784
+ <key>end</key>
3785
+ <string>\}</string>
3786
+ <key>endCaptures</key>
3787
+ <dict>
3788
+ <key>0</key>
3789
+ <dict>
3790
+ <key>name</key>
3791
+ <string>punctuation.definition.template-expression.end.apex</string>
3792
+ </dict>
3793
+ </dict>
3794
+ <key>patterns</key>
3795
+ <array>
3796
+ <dict>
3797
+ <key>name</key>
3798
+ <string>variable.other.readwrite.apex</string>
3799
+ <key>match</key>
3800
+ <string>@?[_[:alpha:]][_[:alnum:]]*</string>
3801
+ </dict>
3802
+ </array>
3803
+ </dict>
3726
3804
  <key>expression-operators</key>
3727
3805
  <dict>
3728
3806
  <key>patterns</key>
@@ -3798,7 +3876,7 @@
3798
3876
  <key>conditional-operator</key>
3799
3877
  <dict>
3800
3878
  <key>begin</key>
3801
- <string>(?&lt;!\?)\?(?!\?|\.|\[)</string>
3879
+ <string>(?&lt;!\?)\?(?!\?|\.(?!\d)|\[)</string>
3802
3880
  <key>beginCaptures</key>
3803
3881
  <dict>
3804
3882
  <key>0</key>
@@ -2117,6 +2117,9 @@ repository:
2117
2117
  {
2118
2118
  include: '#numeric-literal'
2119
2119
  }
2120
+ {
2121
+ include: '#multiline-string-literal'
2122
+ }
2120
2123
  {
2121
2124
  include: '#string-literal'
2122
2125
  }
@@ -2174,9 +2177,27 @@ repository:
2174
2177
  match: '\\b[0-9_]+(U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?\\b'
2175
2178
  }
2176
2179
  ]
2180
+ 'multiline-string-literal':
2181
+ name: 'string.quoted.single.multiline.apex'
2182
+ begin: "'''"
2183
+ beginCaptures:
2184
+ '0':
2185
+ name: 'punctuation.definition.string.begin.apex'
2186
+ end: "'''"
2187
+ endCaptures:
2188
+ '0':
2189
+ name: 'punctuation.definition.string.end.apex'
2190
+ patterns: [
2191
+ {
2192
+ include: '#string-character-escape'
2193
+ }
2194
+ {
2195
+ include: '#string-template-expression'
2196
+ }
2197
+ ]
2177
2198
  'string-literal':
2178
2199
  name: 'string.quoted.single.apex'
2179
- begin: "'"
2200
+ begin: "\\'(?!'')"
2180
2201
  beginCaptures:
2181
2202
  '0':
2182
2203
  name: 'punctuation.definition.string.begin.apex'
@@ -2190,10 +2211,29 @@ repository:
2190
2211
  {
2191
2212
  include: '#string-character-escape'
2192
2213
  }
2214
+ {
2215
+ include: '#string-template-expression'
2216
+ }
2193
2217
  ]
2194
2218
  'string-character-escape':
2195
2219
  name: 'constant.character.escape.apex'
2196
2220
  match: '\\\\.'
2221
+ 'string-template-expression':
2222
+ name: 'meta.template-expression.apex'
2223
+ begin: '\\$\\{'
2224
+ beginCaptures:
2225
+ '0':
2226
+ name: 'punctuation.definition.template-expression.begin.apex'
2227
+ end: '\\}'
2228
+ endCaptures:
2229
+ '0':
2230
+ name: 'punctuation.definition.template-expression.end.apex'
2231
+ patterns: [
2232
+ {
2233
+ name: 'variable.other.readwrite.apex'
2234
+ match: '@?[_[:alpha:]][_[:alnum:]]*'
2235
+ }
2236
+ ]
2197
2237
  'expression-operators':
2198
2238
  patterns: [
2199
2239
  {
@@ -2242,7 +2282,7 @@ repository:
2242
2282
  }
2243
2283
  ]
2244
2284
  'conditional-operator':
2245
- begin: '(?<!\\?)\\?(?!\\?|\\.|\\[)'
2285
+ begin: '(?<!\\?)\\?(?!\\?|\\.(?!\\d)|\\[)'
2246
2286
  beginCaptures:
2247
2287
  '0':
2248
2288
  name: 'keyword.operator.conditional.question-mark.apex'
@@ -3570,6 +3570,10 @@
3570
3570
  <key>include</key>
3571
3571
  <string>#numeric-literal</string>
3572
3572
  </dict>
3573
+ <dict>
3574
+ <key>include</key>
3575
+ <string>#multiline-string-literal</string>
3576
+ </dict>
3573
3577
  <dict>
3574
3578
  <key>include</key>
3575
3579
  <string>#string-literal</string>
@@ -3661,12 +3665,48 @@
3661
3665
  </dict>
3662
3666
  </array>
3663
3667
  </dict>
3668
+ <key>multiline-string-literal</key>
3669
+ <dict>
3670
+ <key>name</key>
3671
+ <string>string.quoted.single.multiline.apex</string>
3672
+ <key>begin</key>
3673
+ <string>'''</string>
3674
+ <key>beginCaptures</key>
3675
+ <dict>
3676
+ <key>0</key>
3677
+ <dict>
3678
+ <key>name</key>
3679
+ <string>punctuation.definition.string.begin.apex</string>
3680
+ </dict>
3681
+ </dict>
3682
+ <key>end</key>
3683
+ <string>'''</string>
3684
+ <key>endCaptures</key>
3685
+ <dict>
3686
+ <key>0</key>
3687
+ <dict>
3688
+ <key>name</key>
3689
+ <string>punctuation.definition.string.end.apex</string>
3690
+ </dict>
3691
+ </dict>
3692
+ <key>patterns</key>
3693
+ <array>
3694
+ <dict>
3695
+ <key>include</key>
3696
+ <string>#string-character-escape</string>
3697
+ </dict>
3698
+ <dict>
3699
+ <key>include</key>
3700
+ <string>#string-template-expression</string>
3701
+ </dict>
3702
+ </array>
3703
+ </dict>
3664
3704
  <key>string-literal</key>
3665
3705
  <dict>
3666
3706
  <key>name</key>
3667
3707
  <string>string.quoted.single.apex</string>
3668
3708
  <key>begin</key>
3669
- <string>'</string>
3709
+ <string>\'(?!'')</string>
3670
3710
  <key>beginCaptures</key>
3671
3711
  <dict>
3672
3712
  <key>0</key>
@@ -3696,6 +3736,10 @@
3696
3736
  <key>include</key>
3697
3737
  <string>#string-character-escape</string>
3698
3738
  </dict>
3739
+ <dict>
3740
+ <key>include</key>
3741
+ <string>#string-template-expression</string>
3742
+ </dict>
3699
3743
  </array>
3700
3744
  </dict>
3701
3745
  <key>string-character-escape</key>
@@ -3705,6 +3749,40 @@
3705
3749
  <key>match</key>
3706
3750
  <string>\\.</string>
3707
3751
  </dict>
3752
+ <key>string-template-expression</key>
3753
+ <dict>
3754
+ <key>name</key>
3755
+ <string>meta.template-expression.apex</string>
3756
+ <key>begin</key>
3757
+ <string>\$\{</string>
3758
+ <key>beginCaptures</key>
3759
+ <dict>
3760
+ <key>0</key>
3761
+ <dict>
3762
+ <key>name</key>
3763
+ <string>punctuation.definition.template-expression.begin.apex</string>
3764
+ </dict>
3765
+ </dict>
3766
+ <key>end</key>
3767
+ <string>\}</string>
3768
+ <key>endCaptures</key>
3769
+ <dict>
3770
+ <key>0</key>
3771
+ <dict>
3772
+ <key>name</key>
3773
+ <string>punctuation.definition.template-expression.end.apex</string>
3774
+ </dict>
3775
+ </dict>
3776
+ <key>patterns</key>
3777
+ <array>
3778
+ <dict>
3779
+ <key>name</key>
3780
+ <string>variable.other.readwrite.apex</string>
3781
+ <key>match</key>
3782
+ <string>@?[_[:alpha:]][_[:alnum:]]*</string>
3783
+ </dict>
3784
+ </array>
3785
+ </dict>
3708
3786
  <key>expression-operators</key>
3709
3787
  <dict>
3710
3788
  <key>patterns</key>
@@ -3780,7 +3858,7 @@
3780
3858
  <key>conditional-operator</key>
3781
3859
  <dict>
3782
3860
  <key>begin</key>
3783
- <string>(?&lt;!\?)\?(?!\?|\.|\[)</string>
3861
+ <string>(?&lt;!\?)\?(?!\?|\.(?!\d)|\[)</string>
3784
3862
  <key>beginCaptures</key>
3785
3863
  <dict>
3786
3864
  <key>0</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/apex-tmlanguage",
3
- "version": "1.8.3",
3
+ "version": "2.0.2",
4
4
  "description": "Textmate grammar for Apex with outputs for VSCode, Atom and TextMate.",
5
5
  "displayName": "apex-tmLanguage",
6
6
  "keywords": [
@@ -36,12 +36,10 @@
36
36
  "build:soql": "node scripts/build-soql.js",
37
37
  "build": "npm run build:grammars && npm run build:atom && npm run build:soql",
38
38
  "compile": "tsc -p .",
39
- "commit-init": "commitizen init cz-conventional-changelog --save-dev --save-exact --force",
40
- "commit": "git-cz",
41
39
  "watch": "tsc -w -p .",
42
40
  "test:soql-tmgrammar": "vscode-tmgrammar-test -g \"./grammars/soql.tmLanguage\" \"./test/soql/*.soql\" ",
43
41
  "test:soql-tmgrammar-snapshots": "vscode-tmgrammar-snap -s source.soql -g \"./grammars/soql.tmLanguage\" \"./test/soql/snapshots/*.soql\" ",
44
- "test": "npm run compile && mocha out/test/**/*.tests.js && npm run test:soql-tmgrammar && npm run test:soql-tmgrammar-snapshots",
42
+ "test": "npm run compile && mocha out/test/**/*.test.js && npm run test:soql-tmgrammar && npm run test:soql-tmgrammar-snapshots",
45
43
  "prepare": "npm run build",
46
44
  "format": "prettier --config .prettierrc.json --write './**/*.{ts,js,json,md}'"
47
45
  },
@@ -51,33 +49,27 @@
51
49
  "README.md"
52
50
  ],
53
51
  "engines": {
54
- "node": ">=16"
52
+ "node": ">=20"
55
53
  },
56
54
  "devDependencies": {
57
- "@commitlint/cli": "^17",
58
- "@commitlint/config-conventional": "^17",
55
+ "@commitlint/cli": "^20",
56
+ "@commitlint/config-conventional": "^20",
59
57
  "@types/chai": "4.3.4",
60
58
  "@types/mocha": "^10.0.10",
61
59
  "chai": "^4.3.7",
62
- "commitizen": "^4.3.1",
63
60
  "cson-parser": "^4.0.9",
64
61
  "cz-conventional-changelog": "^3.3.0",
65
- "js-yaml": "^4.1.0",
66
- "mocha": "^10.1.0",
62
+ "js-yaml": "^4.1.1",
63
+ "mocha": "^11.7.5",
67
64
  "plist": "^3.1.0",
68
- "prettier": "^2.8.0",
65
+ "prettier": "^3.6.2",
69
66
  "typescript": "4.9.3",
70
- "vscode-textmate": "^9.2.0",
67
+ "vscode-textmate": "^9.2.1",
71
68
  "vscode-tmgrammar-test": "^0.1.3"
72
69
  },
73
70
  "husky": {
74
71
  "hooks": {
75
72
  "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
76
73
  }
77
- },
78
- "config": {
79
- "commitizen": {
80
- "path": "./node_modules/cz-conventional-changelog"
81
- }
82
74
  }
83
75
  }