@salesforce/apex-tmlanguage 2.0.1 → 2.0.3

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.
@@ -2921,6 +2921,10 @@
2921
2921
  <dict>
2922
2922
  <key>patterns</key>
2923
2923
  <array>
2924
+ <dict>
2925
+ <key>include</key>
2926
+ <string>#multiline-string-literal</string>
2927
+ </dict>
2924
2928
  <dict>
2925
2929
  <key>include</key>
2926
2930
  <string>#string-literal</string>
@@ -2941,6 +2945,10 @@
2941
2945
  <dict>
2942
2946
  <key>patterns</key>
2943
2947
  <array>
2948
+ <dict>
2949
+ <key>include</key>
2950
+ <string>#multiline-string-literal</string>
2951
+ </dict>
2944
2952
  <dict>
2945
2953
  <key>include</key>
2946
2954
  <string>#string-literal</string>
@@ -3588,6 +3596,10 @@
3588
3596
  <key>include</key>
3589
3597
  <string>#numeric-literal</string>
3590
3598
  </dict>
3599
+ <dict>
3600
+ <key>include</key>
3601
+ <string>#multiline-string-literal</string>
3602
+ </dict>
3591
3603
  <dict>
3592
3604
  <key>include</key>
3593
3605
  <string>#string-literal</string>
@@ -3679,12 +3691,44 @@
3679
3691
  </dict>
3680
3692
  </array>
3681
3693
  </dict>
3694
+ <key>multiline-string-literal</key>
3695
+ <dict>
3696
+ <key>name</key>
3697
+ <string>string.quoted.single.apex string.quoted.single.multiline.apex</string>
3698
+ <key>begin</key>
3699
+ <string>'''(?=$)</string>
3700
+ <key>beginCaptures</key>
3701
+ <dict>
3702
+ <key>0</key>
3703
+ <dict>
3704
+ <key>name</key>
3705
+ <string>punctuation.definition.string.begin.apex</string>
3706
+ </dict>
3707
+ </dict>
3708
+ <key>end</key>
3709
+ <string>'''</string>
3710
+ <key>endCaptures</key>
3711
+ <dict>
3712
+ <key>0</key>
3713
+ <dict>
3714
+ <key>name</key>
3715
+ <string>punctuation.definition.string.end.apex</string>
3716
+ </dict>
3717
+ </dict>
3718
+ <key>patterns</key>
3719
+ <array>
3720
+ <dict>
3721
+ <key>include</key>
3722
+ <string>#string-character-escape</string>
3723
+ </dict>
3724
+ </array>
3725
+ </dict>
3682
3726
  <key>string-literal</key>
3683
3727
  <dict>
3684
3728
  <key>name</key>
3685
3729
  <string>string.quoted.single.apex</string>
3686
3730
  <key>begin</key>
3687
- <string>'</string>
3731
+ <string>\'(?!'')</string>
3688
3732
  <key>beginCaptures</key>
3689
3733
  <dict>
3690
3734
  <key>0</key>
@@ -3714,6 +3758,10 @@
3714
3758
  <key>include</key>
3715
3759
  <string>#string-character-escape</string>
3716
3760
  </dict>
3761
+ <dict>
3762
+ <key>include</key>
3763
+ <string>#string-template-expression</string>
3764
+ </dict>
3717
3765
  </array>
3718
3766
  </dict>
3719
3767
  <key>string-character-escape</key>
@@ -3723,6 +3771,40 @@
3723
3771
  <key>match</key>
3724
3772
  <string>\\.</string>
3725
3773
  </dict>
3774
+ <key>string-template-expression</key>
3775
+ <dict>
3776
+ <key>name</key>
3777
+ <string>meta.template-expression.apex</string>
3778
+ <key>begin</key>
3779
+ <string>(?&lt;!\\)\$\{</string>
3780
+ <key>beginCaptures</key>
3781
+ <dict>
3782
+ <key>0</key>
3783
+ <dict>
3784
+ <key>name</key>
3785
+ <string>punctuation.definition.template-expression.begin.apex</string>
3786
+ </dict>
3787
+ </dict>
3788
+ <key>end</key>
3789
+ <string>\}</string>
3790
+ <key>endCaptures</key>
3791
+ <dict>
3792
+ <key>0</key>
3793
+ <dict>
3794
+ <key>name</key>
3795
+ <string>punctuation.definition.template-expression.end.apex</string>
3796
+ </dict>
3797
+ </dict>
3798
+ <key>patterns</key>
3799
+ <array>
3800
+ <dict>
3801
+ <key>name</key>
3802
+ <string>variable.other.readwrite.apex</string>
3803
+ <key>match</key>
3804
+ <string>\G@?[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*</string>
3805
+ </dict>
3806
+ </array>
3807
+ </dict>
3726
3808
  <key>expression-operators</key>
3727
3809
  <dict>
3728
3810
  <key>patterns</key>
@@ -1720,6 +1720,9 @@ repository:
1720
1720
  name: 'keyword.control.switch.when.apex'
1721
1721
  '2':
1722
1722
  patterns: [
1723
+ {
1724
+ include: '#multiline-string-literal'
1725
+ }
1723
1726
  {
1724
1727
  include: '#string-literal'
1725
1728
  }
@@ -1732,6 +1735,9 @@ repository:
1732
1735
  ]
1733
1736
  '5':
1734
1737
  patterns: [
1738
+ {
1739
+ include: '#multiline-string-literal'
1740
+ }
1735
1741
  {
1736
1742
  include: '#string-literal'
1737
1743
  }
@@ -2117,6 +2123,9 @@ repository:
2117
2123
  {
2118
2124
  include: '#numeric-literal'
2119
2125
  }
2126
+ {
2127
+ include: '#multiline-string-literal'
2128
+ }
2120
2129
  {
2121
2130
  include: '#string-literal'
2122
2131
  }
@@ -2174,9 +2183,24 @@ repository:
2174
2183
  match: '\\b[0-9_]+(U|u|L|l|UL|Ul|uL|ul|LU|Lu|lU|lu)?\\b'
2175
2184
  }
2176
2185
  ]
2186
+ 'multiline-string-literal':
2187
+ name: 'string.quoted.single.apex string.quoted.single.multiline.apex'
2188
+ begin: "'''(?=$)"
2189
+ beginCaptures:
2190
+ '0':
2191
+ name: 'punctuation.definition.string.begin.apex'
2192
+ end: "'''"
2193
+ endCaptures:
2194
+ '0':
2195
+ name: 'punctuation.definition.string.end.apex'
2196
+ patterns: [
2197
+ {
2198
+ include: '#string-character-escape'
2199
+ }
2200
+ ]
2177
2201
  'string-literal':
2178
2202
  name: 'string.quoted.single.apex'
2179
- begin: "'"
2203
+ begin: "\\'(?!'')"
2180
2204
  beginCaptures:
2181
2205
  '0':
2182
2206
  name: 'punctuation.definition.string.begin.apex'
@@ -2190,10 +2214,29 @@ repository:
2190
2214
  {
2191
2215
  include: '#string-character-escape'
2192
2216
  }
2217
+ {
2218
+ include: '#string-template-expression'
2219
+ }
2193
2220
  ]
2194
2221
  'string-character-escape':
2195
2222
  name: 'constant.character.escape.apex'
2196
2223
  match: '\\\\.'
2224
+ 'string-template-expression':
2225
+ name: 'meta.template-expression.apex'
2226
+ begin: '(?<!\\\\)\\$\\{'
2227
+ beginCaptures:
2228
+ '0':
2229
+ name: 'punctuation.definition.template-expression.begin.apex'
2230
+ end: '\\}'
2231
+ endCaptures:
2232
+ '0':
2233
+ name: 'punctuation.definition.template-expression.end.apex'
2234
+ patterns: [
2235
+ {
2236
+ name: 'variable.other.readwrite.apex'
2237
+ match: '\\G@?[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*'
2238
+ }
2239
+ ]
2197
2240
  'expression-operators':
2198
2241
  patterns: [
2199
2242
  {
@@ -2903,6 +2903,10 @@
2903
2903
  <dict>
2904
2904
  <key>patterns</key>
2905
2905
  <array>
2906
+ <dict>
2907
+ <key>include</key>
2908
+ <string>#multiline-string-literal</string>
2909
+ </dict>
2906
2910
  <dict>
2907
2911
  <key>include</key>
2908
2912
  <string>#string-literal</string>
@@ -2923,6 +2927,10 @@
2923
2927
  <dict>
2924
2928
  <key>patterns</key>
2925
2929
  <array>
2930
+ <dict>
2931
+ <key>include</key>
2932
+ <string>#multiline-string-literal</string>
2933
+ </dict>
2926
2934
  <dict>
2927
2935
  <key>include</key>
2928
2936
  <string>#string-literal</string>
@@ -3570,6 +3578,10 @@
3570
3578
  <key>include</key>
3571
3579
  <string>#numeric-literal</string>
3572
3580
  </dict>
3581
+ <dict>
3582
+ <key>include</key>
3583
+ <string>#multiline-string-literal</string>
3584
+ </dict>
3573
3585
  <dict>
3574
3586
  <key>include</key>
3575
3587
  <string>#string-literal</string>
@@ -3661,12 +3673,44 @@
3661
3673
  </dict>
3662
3674
  </array>
3663
3675
  </dict>
3676
+ <key>multiline-string-literal</key>
3677
+ <dict>
3678
+ <key>name</key>
3679
+ <string>string.quoted.single.apex string.quoted.single.multiline.apex</string>
3680
+ <key>begin</key>
3681
+ <string>'''(?=$)</string>
3682
+ <key>beginCaptures</key>
3683
+ <dict>
3684
+ <key>0</key>
3685
+ <dict>
3686
+ <key>name</key>
3687
+ <string>punctuation.definition.string.begin.apex</string>
3688
+ </dict>
3689
+ </dict>
3690
+ <key>end</key>
3691
+ <string>'''</string>
3692
+ <key>endCaptures</key>
3693
+ <dict>
3694
+ <key>0</key>
3695
+ <dict>
3696
+ <key>name</key>
3697
+ <string>punctuation.definition.string.end.apex</string>
3698
+ </dict>
3699
+ </dict>
3700
+ <key>patterns</key>
3701
+ <array>
3702
+ <dict>
3703
+ <key>include</key>
3704
+ <string>#string-character-escape</string>
3705
+ </dict>
3706
+ </array>
3707
+ </dict>
3664
3708
  <key>string-literal</key>
3665
3709
  <dict>
3666
3710
  <key>name</key>
3667
3711
  <string>string.quoted.single.apex</string>
3668
3712
  <key>begin</key>
3669
- <string>'</string>
3713
+ <string>\'(?!'')</string>
3670
3714
  <key>beginCaptures</key>
3671
3715
  <dict>
3672
3716
  <key>0</key>
@@ -3696,6 +3740,10 @@
3696
3740
  <key>include</key>
3697
3741
  <string>#string-character-escape</string>
3698
3742
  </dict>
3743
+ <dict>
3744
+ <key>include</key>
3745
+ <string>#string-template-expression</string>
3746
+ </dict>
3699
3747
  </array>
3700
3748
  </dict>
3701
3749
  <key>string-character-escape</key>
@@ -3705,6 +3753,40 @@
3705
3753
  <key>match</key>
3706
3754
  <string>\\.</string>
3707
3755
  </dict>
3756
+ <key>string-template-expression</key>
3757
+ <dict>
3758
+ <key>name</key>
3759
+ <string>meta.template-expression.apex</string>
3760
+ <key>begin</key>
3761
+ <string>(?&lt;!\\)\$\{</string>
3762
+ <key>beginCaptures</key>
3763
+ <dict>
3764
+ <key>0</key>
3765
+ <dict>
3766
+ <key>name</key>
3767
+ <string>punctuation.definition.template-expression.begin.apex</string>
3768
+ </dict>
3769
+ </dict>
3770
+ <key>end</key>
3771
+ <string>\}</string>
3772
+ <key>endCaptures</key>
3773
+ <dict>
3774
+ <key>0</key>
3775
+ <dict>
3776
+ <key>name</key>
3777
+ <string>punctuation.definition.template-expression.end.apex</string>
3778
+ </dict>
3779
+ </dict>
3780
+ <key>patterns</key>
3781
+ <array>
3782
+ <dict>
3783
+ <key>name</key>
3784
+ <string>variable.other.readwrite.apex</string>
3785
+ <key>match</key>
3786
+ <string>\G@?[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*</string>
3787
+ </dict>
3788
+ </array>
3789
+ </dict>
3708
3790
  <key>expression-operators</key>
3709
3791
  <dict>
3710
3792
  <key>patterns</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/apex-tmlanguage",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "Textmate grammar for Apex with outputs for VSCode, Atom and TextMate.",
5
5
  "displayName": "apex-tmLanguage",
6
6
  "keywords": [
@@ -39,7 +39,7 @@
39
39
  "watch": "tsc -w -p .",
40
40
  "test:soql-tmgrammar": "vscode-tmgrammar-test -g \"./grammars/soql.tmLanguage\" \"./test/soql/*.soql\" ",
41
41
  "test:soql-tmgrammar-snapshots": "vscode-tmgrammar-snap -s source.soql -g \"./grammars/soql.tmLanguage\" \"./test/soql/snapshots/*.soql\" ",
42
- "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",
43
43
  "prepare": "npm run build",
44
44
  "format": "prettier --config .prettierrc.json --write './**/*.{ts,js,json,md}'"
45
45
  },