@salesforce/apex-tmlanguage 1.7.0 → 1.8.1
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.
- package/LICENSE +0 -25
- package/grammars/apex.tmLanguage +60 -60
- package/grammars/apex.tmLanguage.cson +1318 -1318
- package/grammars/soql.tmLanguage +60 -60
- package/package.json +27 -30
package/grammars/soql.tmLanguage
CHANGED
|
@@ -382,7 +382,7 @@
|
|
|
382
382
|
</dict>
|
|
383
383
|
</dict>
|
|
384
384
|
<key>end</key>
|
|
385
|
-
<string>(?<=\)
|
|
385
|
+
<string>(?=\s(?!\())|(?=\s*$)|(?<=\s*\))</string>
|
|
386
386
|
<key>patterns</key>
|
|
387
387
|
<array>
|
|
388
388
|
<dict>
|
|
@@ -1896,15 +1896,15 @@
|
|
|
1896
1896
|
<dict>
|
|
1897
1897
|
<key>begin</key>
|
|
1898
1898
|
<string>(?x)
|
|
1899
|
-
(?<
|
|
1899
|
+
(?<type_name>
|
|
1900
1900
|
(?:
|
|
1901
1901
|
(?:
|
|
1902
1902
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
1903
|
-
(?<
|
|
1903
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
1904
1904
|
\g<identifier>\s*
|
|
1905
|
-
(?<
|
|
1905
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
1906
1906
|
)
|
|
1907
|
-
(?:\s*\.\s*\g<
|
|
1907
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
1908
1908
|
)
|
|
1909
1909
|
(?:\s*\?\s*)? # nullable suffix?
|
|
1910
1910
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -1967,25 +1967,25 @@
|
|
|
1967
1967
|
<key>begin</key>
|
|
1968
1968
|
<string>(?x)
|
|
1969
1969
|
(?!.*\b(?:class|interface|enum)\b)\s*
|
|
1970
|
-
(?<
|
|
1971
|
-
(?<
|
|
1970
|
+
(?<return_type>
|
|
1971
|
+
(?<type_name>
|
|
1972
1972
|
(?:
|
|
1973
1973
|
(?:ref\s+)? # ref return
|
|
1974
1974
|
(?:
|
|
1975
1975
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
1976
|
-
(?<
|
|
1976
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
1977
1977
|
\g<identifier>\s*
|
|
1978
|
-
(?<
|
|
1978
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
1979
1979
|
)
|
|
1980
|
-
(?:\s*\.\s*\g<
|
|
1980
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
1981
1981
|
)
|
|
1982
1982
|
(?:\s*\?\s*)? # nullable suffix?
|
|
1983
1983
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
1984
1984
|
)
|
|
1985
1985
|
)\s+
|
|
1986
1986
|
)
|
|
1987
|
-
(?<
|
|
1988
|
-
(?<
|
|
1987
|
+
(?<interface_name>\g<type_name>\s*\.\s*)?
|
|
1988
|
+
(?<property_name>\g<identifier>)\s*
|
|
1989
1989
|
(?=\{|=>|$)</string>
|
|
1990
1990
|
<key>beginCaptures</key>
|
|
1991
1991
|
<dict>
|
|
@@ -2049,25 +2049,25 @@
|
|
|
2049
2049
|
<dict>
|
|
2050
2050
|
<key>begin</key>
|
|
2051
2051
|
<string>(?x)
|
|
2052
|
-
(?<
|
|
2053
|
-
(?<
|
|
2052
|
+
(?<return_type>
|
|
2053
|
+
(?<type_name>
|
|
2054
2054
|
(?:
|
|
2055
2055
|
(?:ref\s+)? # ref return
|
|
2056
2056
|
(?:
|
|
2057
2057
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
2058
|
-
(?<
|
|
2058
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
2059
2059
|
\g<identifier>\s*
|
|
2060
|
-
(?<
|
|
2060
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
2061
2061
|
)
|
|
2062
|
-
(?:\s*\.\s*\g<
|
|
2062
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
2063
2063
|
)
|
|
2064
2064
|
(?:\s*\?\s*)? # nullable suffix?
|
|
2065
2065
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
2066
2066
|
)
|
|
2067
2067
|
)\s+
|
|
2068
2068
|
)
|
|
2069
|
-
(?<
|
|
2070
|
-
(?<
|
|
2069
|
+
(?<interface_name>\g<type_name>\s*\.\s*)?
|
|
2070
|
+
(?<indexer_name>this)\s*
|
|
2071
2071
|
(?=\[)</string>
|
|
2072
2072
|
<key>beginCaptures</key>
|
|
2073
2073
|
<dict>
|
|
@@ -2187,24 +2187,24 @@
|
|
|
2187
2187
|
<dict>
|
|
2188
2188
|
<key>begin</key>
|
|
2189
2189
|
<string>(?x)
|
|
2190
|
-
(?<
|
|
2191
|
-
(?<
|
|
2190
|
+
(?<return_type>
|
|
2191
|
+
(?<type_name>
|
|
2192
2192
|
(?:
|
|
2193
2193
|
(?:ref\s+)? # ref return
|
|
2194
2194
|
(?:
|
|
2195
2195
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
2196
|
-
(?<
|
|
2196
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
2197
2197
|
\g<identifier>\s*
|
|
2198
|
-
(?<
|
|
2198
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
2199
2199
|
)
|
|
2200
|
-
(?:\s*\.\s*\g<
|
|
2200
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
2201
2201
|
)
|
|
2202
2202
|
(?:\s*\?\s*)? # nullable suffix?
|
|
2203
2203
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
2204
2204
|
)
|
|
2205
2205
|
)\s+
|
|
2206
2206
|
)
|
|
2207
|
-
(?<
|
|
2207
|
+
(?<interface_name>\g<type_name>\s*\.\s*)?
|
|
2208
2208
|
(\g<identifier>)\s*
|
|
2209
2209
|
(<([^<>]+)>)?\s*
|
|
2210
2210
|
(?=\()</string>
|
|
@@ -3217,15 +3217,15 @@
|
|
|
3217
3217
|
<dict>
|
|
3218
3218
|
<key>match</key>
|
|
3219
3219
|
<string>(?x)
|
|
3220
|
-
(?<
|
|
3220
|
+
(?<type_name>
|
|
3221
3221
|
(?:
|
|
3222
3222
|
(?:
|
|
3223
3223
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
3224
|
-
(?<
|
|
3224
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
3225
3225
|
\g<identifier>\s*
|
|
3226
|
-
(?<
|
|
3226
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
3227
3227
|
)
|
|
3228
|
-
(?:\s*\.\s*\g<
|
|
3228
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
3229
3229
|
)
|
|
3230
3230
|
(?:\s*\?\s*)? # nullable suffix?
|
|
3231
3231
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -3287,16 +3287,16 @@
|
|
|
3287
3287
|
<string>(?x)
|
|
3288
3288
|
(?:
|
|
3289
3289
|
(?:(\bref)\s+)?(\bvar\b)| # ref local
|
|
3290
|
-
(?<
|
|
3290
|
+
(?<type_name>
|
|
3291
3291
|
(?:
|
|
3292
3292
|
(?:ref\s+)? # ref local
|
|
3293
3293
|
(?:
|
|
3294
3294
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
3295
|
-
(?<
|
|
3295
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
3296
3296
|
\g<identifier>\s*
|
|
3297
|
-
(?<
|
|
3297
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
3298
3298
|
)
|
|
3299
|
-
(?:\s*\.\s*\g<
|
|
3299
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
3300
3300
|
)
|
|
3301
3301
|
(?:\s*\?\s*)? # nullable suffix?
|
|
3302
3302
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -3365,16 +3365,16 @@
|
|
|
3365
3365
|
<dict>
|
|
3366
3366
|
<key>begin</key>
|
|
3367
3367
|
<string>(?x)
|
|
3368
|
-
(?<
|
|
3369
|
-
(?<
|
|
3368
|
+
(?<const_keyword>\b(?:const)\b)\s*
|
|
3369
|
+
(?<type_name>
|
|
3370
3370
|
(?:
|
|
3371
3371
|
(?:
|
|
3372
3372
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
3373
|
-
(?<
|
|
3373
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
3374
3374
|
\g<identifier>\s*
|
|
3375
|
-
(?<
|
|
3375
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
3376
3376
|
)
|
|
3377
|
-
(?:\s*\.\s*\g<
|
|
3377
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
3378
3378
|
)
|
|
3379
3379
|
(?:\s*\?\s*)? # nullable suffix?
|
|
3380
3380
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -3778,15 +3778,15 @@
|
|
|
3778
3778
|
<key>match</key>
|
|
3779
3779
|
<string>(?x)
|
|
3780
3780
|
(\()\s*
|
|
3781
|
-
(?<
|
|
3781
|
+
(?<type_name>
|
|
3782
3782
|
(?:
|
|
3783
3783
|
(?:
|
|
3784
3784
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
3785
|
-
(?<
|
|
3785
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
3786
3786
|
\g<identifier>\s*
|
|
3787
|
-
(?<
|
|
3787
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
3788
3788
|
)
|
|
3789
|
-
(?:\s*\.\s*\g<
|
|
3789
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
3790
3790
|
)
|
|
3791
3791
|
(?:\s*\?\s*)? # nullable suffix?
|
|
3792
3792
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -3840,7 +3840,7 @@
|
|
|
3840
3840
|
<string>(?x)
|
|
3841
3841
|
(?:(\??\.)\s*)? # safe navigator or accessor
|
|
3842
3842
|
(@?[_[:alpha:]][_[:alnum:]]*)\s* # method name
|
|
3843
|
-
(?<
|
|
3843
|
+
(?<type_args>\s*<([^<>]|\g<type_args>)+>\s*)?\s* # type arguments
|
|
3844
3844
|
(?=\() # open paren of argument list</string>
|
|
3845
3845
|
<key>beginCaptures</key>
|
|
3846
3846
|
<dict>
|
|
@@ -3967,7 +3967,7 @@
|
|
|
3967
3967
|
<string>(?x)
|
|
3968
3968
|
(\??\.)?\s*
|
|
3969
3969
|
(@?[_[:alpha:]][_[:alnum:]]*)
|
|
3970
|
-
(?<
|
|
3970
|
+
(?<type_params>\s*<([^<>]|\g<type_params>)+>\s*)
|
|
3971
3971
|
(?=
|
|
3972
3972
|
(\s*\?)?
|
|
3973
3973
|
\s*\.\s*@?[_[:alpha:]][_[:alnum:]]*
|
|
@@ -4048,15 +4048,15 @@
|
|
|
4048
4048
|
<string>(?x)
|
|
4049
4049
|
(delete|insert|undelete|update|upsert)?
|
|
4050
4050
|
\s*(new)\s+
|
|
4051
|
-
(?<
|
|
4051
|
+
(?<type_name>
|
|
4052
4052
|
(?:
|
|
4053
4053
|
(?:
|
|
4054
4054
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
4055
|
-
(?<
|
|
4055
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
4056
4056
|
\g<identifier>\s*
|
|
4057
|
-
(?<
|
|
4057
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
4058
4058
|
)
|
|
4059
|
-
(?:\s*\.\s*\g<
|
|
4059
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
4060
4060
|
)
|
|
4061
4061
|
(?:\s*\?\s*)? # nullable suffix?
|
|
4062
4062
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -4106,15 +4106,15 @@
|
|
|
4106
4106
|
<string>(?x)
|
|
4107
4107
|
(delete|insert|undelete|update|upsert)?
|
|
4108
4108
|
\s*(new)\s+
|
|
4109
|
-
(?<
|
|
4109
|
+
(?<type_name>
|
|
4110
4110
|
(?:
|
|
4111
4111
|
(?:
|
|
4112
4112
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
4113
|
-
(?<
|
|
4113
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
4114
4114
|
\g<identifier>\s*
|
|
4115
|
-
(?<
|
|
4115
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
4116
4116
|
)
|
|
4117
|
-
(?:\s*\.\s*\g<
|
|
4117
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
4118
4118
|
)
|
|
4119
4119
|
(?:\s*\?\s*)? # nullable suffix?
|
|
4120
4120
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -4154,15 +4154,15 @@
|
|
|
4154
4154
|
<key>begin</key>
|
|
4155
4155
|
<string>(?x)
|
|
4156
4156
|
\b(new)\b\s*
|
|
4157
|
-
(?<
|
|
4157
|
+
(?<type_name>
|
|
4158
4158
|
(?:
|
|
4159
4159
|
(?:
|
|
4160
4160
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
4161
|
-
(?<
|
|
4161
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
4162
4162
|
\g<identifier>\s*
|
|
4163
|
-
(?<
|
|
4163
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
4164
4164
|
)
|
|
4165
|
-
(?:\s*\.\s*\g<
|
|
4165
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
4166
4166
|
)
|
|
4167
4167
|
(?:\s*\?\s*)? # nullable suffix?
|
|
4168
4168
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
|
@@ -4248,16 +4248,16 @@
|
|
|
4248
4248
|
<key>match</key>
|
|
4249
4249
|
<string>(?x)
|
|
4250
4250
|
(?:(?:\b(this)\b)\s+)?
|
|
4251
|
-
(?<
|
|
4251
|
+
(?<type_name>
|
|
4252
4252
|
(?:
|
|
4253
4253
|
(?:ref\s+)? # ref return
|
|
4254
4254
|
(?:
|
|
4255
4255
|
(?:(?<identifier>@?[_[:alpha:]][_[:alnum:]]*)\s*\:\:\s*)? # alias-qualification
|
|
4256
|
-
(?<
|
|
4256
|
+
(?<name_and_type_args> # identifier + type arguments (if any)
|
|
4257
4257
|
\g<identifier>\s*
|
|
4258
|
-
(?<
|
|
4258
|
+
(?<type_args>\s*<(?:[^<>]|\g<type_args>)+>\s*)?
|
|
4259
4259
|
)
|
|
4260
|
-
(?:\s*\.\s*\g<
|
|
4260
|
+
(?:\s*\.\s*\g<name_and_type_args>)*
|
|
4261
4261
|
)
|
|
4262
4262
|
(?:\s*\?\s*)? # nullable suffix?
|
|
4263
4263
|
(?:\s*\[(?:\s*,\s*)*\]\s*)* # array suffix?
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/apex-tmlanguage",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.8.1",
|
|
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": "
|
|
35
|
-
"
|
|
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": "
|
|
39
|
-
"test:soql-tmgrammar": "vscode-tmgrammar-test -
|
|
40
|
-
"test:soql-tmgrammar-snapshots": "vscode-tmgrammar-snap -s source.soql -g \"./grammars/soql.tmLanguage\"
|
|
41
|
-
"test": "
|
|
42
|
-
"prepare": "
|
|
43
|
-
"build:default": "gulp default",
|
|
41
|
+
"watch": "tsc -w -p .",
|
|
42
|
+
"test:soql-tmgrammar": "vscode-tmgrammar-test -g \"./grammars/soql.tmLanguage\" \"./test/soql/*.soql\" ",
|
|
43
|
+
"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",
|
|
45
|
+
"prepare": "npm run build",
|
|
44
46
|
"format": "prettier --config .prettierrc.json --write './**/*.{ts,js,json,md}'"
|
|
45
47
|
},
|
|
46
48
|
"files": [
|
|
@@ -49,29 +51,24 @@
|
|
|
49
51
|
"README.md"
|
|
50
52
|
],
|
|
51
53
|
"engines": {
|
|
52
|
-
"node": ">=
|
|
54
|
+
"node": ">=16"
|
|
53
55
|
},
|
|
54
56
|
"devDependencies": {
|
|
55
|
-
"@commitlint/cli": "^
|
|
56
|
-
"@commitlint/config-conventional": "^
|
|
57
|
-
"@types/chai": "4.
|
|
58
|
-
"@types/
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"cz-conventional-changelog": "^
|
|
63
|
-
"
|
|
64
|
-
"
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"plist": "^3.0.1",
|
|
71
|
-
"prettier": "^1.13.5",
|
|
72
|
-
"typescript": "3.7.5",
|
|
73
|
-
"vscode-textmate": "4.4.0",
|
|
74
|
-
"vscode-tmgrammar-test": "^0.0.10"
|
|
57
|
+
"@commitlint/cli": "^17",
|
|
58
|
+
"@commitlint/config-conventional": "^17",
|
|
59
|
+
"@types/chai": "4.3.4",
|
|
60
|
+
"@types/mocha": "^10.0.10",
|
|
61
|
+
"chai": "^4.3.7",
|
|
62
|
+
"commitizen": "^4.3.1",
|
|
63
|
+
"cson-parser": "^4.0.9",
|
|
64
|
+
"cz-conventional-changelog": "^3.3.0",
|
|
65
|
+
"js-yaml": "^4.1.0",
|
|
66
|
+
"mocha": "^10.1.0",
|
|
67
|
+
"plist": "^3.1.0",
|
|
68
|
+
"prettier": "^2.8.0",
|
|
69
|
+
"typescript": "4.9.3",
|
|
70
|
+
"vscode-textmate": "^9.2.0",
|
|
71
|
+
"vscode-tmgrammar-test": "^0.1.3"
|
|
75
72
|
},
|
|
76
73
|
"husky": {
|
|
77
74
|
"hooks": {
|