@salesforce/apex-tmlanguage 1.8.0 → 1.8.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.
@@ -382,7 +382,7 @@
382
382
  </dict>
383
383
  </dict>
384
384
  <key>end</key>
385
- <string>(?&lt;=\)|$)</string>
385
+ <string>(?=\s(?!\())|(?=\s*$)|(?&lt;=\s*\))</string>
386
386
  <key>patterns</key>
387
387
  <array>
388
388
  <dict>
@@ -1334,7 +1334,7 @@
1334
1334
  <key>implements-class</key>
1335
1335
  <dict>
1336
1336
  <key>begin</key>
1337
- <string>(implements)\b\s+([_[:alpha:]][_[:alnum:]]*)</string>
1337
+ <string>(implements)\b</string>
1338
1338
  <key>beginCaptures</key>
1339
1339
  <dict>
1340
1340
  <key>1</key>
@@ -1342,12 +1342,27 @@
1342
1342
  <key>name</key>
1343
1343
  <string>keyword.other.implements.apex</string>
1344
1344
  </dict>
1345
- <key>2</key>
1345
+ </dict>
1346
+ <key>patterns</key>
1347
+ <array>
1346
1348
  <dict>
1347
- <key>name</key>
1348
- <string>entity.name.type.implements.apex</string>
1349
+ <key>match</key>
1350
+ <string>([_[:alpha:]][_[:alnum:]]*)\b\s*(,)?</string>
1351
+ <key>captures</key>
1352
+ <dict>
1353
+ <key>1</key>
1354
+ <dict>
1355
+ <key>name</key>
1356
+ <string>entity.name.type.implements.apex</string>
1357
+ </dict>
1358
+ <key>2</key>
1359
+ <dict>
1360
+ <key>name</key>
1361
+ <string>punctuation.separator.comma.apex</string>
1362
+ </dict>
1363
+ </dict>
1349
1364
  </dict>
1350
- </dict>
1365
+ </array>
1351
1366
  <key>end</key>
1352
1367
  <string>(?={|extends)</string>
1353
1368
  </dict>
@@ -2645,7 +2660,7 @@
2645
2660
  <string>(?x)
2646
2661
  (switch)\b\s+
2647
2662
  (on)\b\s+
2648
- (?:([_.?\'\(\)[:alnum:]]+)\s*)?
2663
+ (.*)
2649
2664
  (\{)</string>
2650
2665
  <key>beginCaptures</key>
2651
2666
  <dict>
@@ -2764,7 +2779,7 @@
2764
2779
  <key>when-string</key>
2765
2780
  <dict>
2766
2781
  <key>begin</key>
2767
- <string>(when)(\b\s*)((\')[_.\,\'\s*[:alnum:]]+)</string>
2782
+ <string>(when)\b\s*('[^'\n]*')(,)?</string>
2768
2783
  <key>beginCaptures</key>
2769
2784
  <dict>
2770
2785
  <key>1</key>
@@ -2773,18 +2788,19 @@
2773
2788
  <string>keyword.control.switch.when.apex</string>
2774
2789
  </dict>
2775
2790
  <key>2</key>
2776
- <dict>
2777
- <key>name</key>
2778
- <string>punctuation.whitespace.apex</string>
2779
- </dict>
2780
- <key>3</key>
2781
2791
  <dict>
2782
2792
  <key>patterns</key>
2783
2793
  <array>
2784
2794
  <dict>
2785
2795
  <key>include</key>
2786
- <string>#when-string-statement</string>
2796
+ <string>#string-literal</string>
2787
2797
  </dict>
2798
+ </array>
2799
+ </dict>
2800
+ <key>3</key>
2801
+ <dict>
2802
+ <key>patterns</key>
2803
+ <array>
2788
2804
  <dict>
2789
2805
  <key>include</key>
2790
2806
  <string>#punctuation-comma</string>
@@ -2806,36 +2822,6 @@
2806
2822
  </dict>
2807
2823
  </array>
2808
2824
  </dict>
2809
- <key>when-string-statement</key>
2810
- <dict>
2811
- <key>patterns</key>
2812
- <array>
2813
- <dict>
2814
- <key>name</key>
2815
- <string>string.quoted.single.apex</string>
2816
- <key>begin</key>
2817
- <string>\'</string>
2818
- <key>beginCaptures</key>
2819
- <dict>
2820
- <key>0</key>
2821
- <dict>
2822
- <key>name</key>
2823
- <string>punctuation.definition.string.begin.apex</string>
2824
- </dict>
2825
- </dict>
2826
- <key>end</key>
2827
- <string>\'</string>
2828
- <key>endCaptures</key>
2829
- <dict>
2830
- <key>0</key>
2831
- <dict>
2832
- <key>name</key>
2833
- <string>punctuation.definition.string.end.apex</string>
2834
- </dict>
2835
- </dict>
2836
- </dict>
2837
- </array>
2838
- </dict>
2839
2825
  <key>when-else-statement</key>
2840
2826
  <dict>
2841
2827
  <key>begin</key>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/apex-tmlanguage",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "Textmate grammar for Apex with outputs for VSCode, Atom and TextMate.",
5
5
  "displayName": "apex-tmLanguage",
6
6
  "keywords": [
@@ -31,16 +31,18 @@
31
31
  }
32
32
  ],
33
33
  "scripts": {
34
- "build": "gulp",
35
- "compile": "node ./node_modules/typescript/bin/tsc -p .",
34
+ "build:grammars": "node scripts/build-grammars.js",
35
+ "build:atom": "node scripts/build-atom.js",
36
+ "build:soql": "node scripts/build-soql.js",
37
+ "build": "npm run build:grammars && npm run build:atom && npm run build:soql",
38
+ "compile": "tsc -p .",
36
39
  "commit-init": "commitizen init cz-conventional-changelog --save-dev --save-exact --force",
37
40
  "commit": "git-cz",
38
- "watch": "node ./node_modules/typescript/bin/tsc -w -p .",
41
+ "watch": "tsc -w -p .",
39
42
  "test:soql-tmgrammar": "vscode-tmgrammar-test -g \"./grammars/soql.tmLanguage\" \"./test/soql/*.soql\" ",
40
43
  "test:soql-tmgrammar-snapshots": "vscode-tmgrammar-snap -s source.soql -g \"./grammars/soql.tmLanguage\" \"./test/soql/snapshots/*.soql\" ",
41
- "test": "gulp test && yarn run test:soql-tmgrammar && yarn run test:soql-tmgrammar-snapshots",
42
- "prepare": "gulp",
43
- "build:default": "gulp default",
44
+ "test": "npm run compile && mocha out/test/**/*.tests.js && npm run test:soql-tmgrammar && npm run test:soql-tmgrammar-snapshots",
45
+ "prepare": "npm run build",
44
46
  "format": "prettier --config .prettierrc.json --write './**/*.{ts,js,json,md}'"
45
47
  },
46
48
  "files": [
@@ -55,23 +57,18 @@
55
57
  "@commitlint/cli": "^17",
56
58
  "@commitlint/config-conventional": "^17",
57
59
  "@types/chai": "4.3.4",
58
- "@types/gulp": "^4.0.10",
59
- "@types/mocha": "^10.0.1",
60
+ "@types/mocha": "^10.0.10",
60
61
  "chai": "^4.3.7",
61
- "commitizen": "^4.2.5",
62
+ "commitizen": "^4.3.1",
63
+ "cson-parser": "^4.0.9",
62
64
  "cz-conventional-changelog": "^3.3.0",
63
- "gulp": "4.0.2",
64
- "gulp-json2cson": "^2.0.0",
65
- "gulp-mocha": "^8.0.0",
66
- "gulp-typescript": "^5.0.1",
67
- "gulp-yaml": "^2.0.4",
68
65
  "js-yaml": "^4.1.0",
69
66
  "mocha": "^10.1.0",
70
- "plist": "^3.0.6",
67
+ "plist": "^3.1.0",
71
68
  "prettier": "^2.8.0",
72
69
  "typescript": "4.9.3",
73
- "vscode-textmate": "7.0.4",
74
- "vscode-tmgrammar-test": "^0.1.1"
70
+ "vscode-textmate": "^9.2.0",
71
+ "vscode-tmgrammar-test": "^0.1.3"
75
72
  },
76
73
  "husky": {
77
74
  "hooks": {