Skip to content

Commit 5db1e7b

Browse files
committed
feat: update language pack grammars
1 parent bdbfa25 commit 5db1e7b

23 files changed

Lines changed: 1922 additions & 1291 deletions

org.eclipse.tm4e.language_pack/README.md

Lines changed: 61 additions & 61 deletions
Large diffs are not rendered by default.

org.eclipse.tm4e.language_pack/about.html

Lines changed: 62 additions & 62 deletions
Large diffs are not rendered by default.

org.eclipse.tm4e.language_pack/plugin.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
<!-- ======================================== -->
196196
<extension point="org.eclipse.core.contenttype.contentTypes">
197197
<content-type id="org.eclipse.tm4e.language_pack.cpp" name="C++" base-type="org.eclipse.tm4e.language_pack.basetype" priority="low"
198-
file-extensions="c++,cc,cpp,cxx,h,h++,hh,hpp,hxx,ii,inl,ino,ipp,ixx,tpp,txx" file-patterns="*.h.in,*.hpp.in" />
198+
file-extensions="c++,c++m,cc,ccm,cpp,cppm,cxx,cxxm,h,h++,hh,hpp,hxx,ii,inl,ino,ipp,ixx,tpp,txx" file-patterns="*.h.in,*.hpp.in" />
199199
</extension>
200200
<extension point="org.eclipse.tm4e.registry.grammars">
201201
<grammar scopeName="source.cpp" path="syntaxes/cpp/cpp.tmLanguage.json" />

org.eclipse.tm4e.language_pack/syntaxes/cpp/c.language-configuration.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
{ "open": "(", "close": ")" },
1515
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
1616
{ "open": "\"", "close": "\"", "notIn": ["string"] },
17-
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] }
17+
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
18+
{ "open": "/**", "close": " */", "notIn": ["string"] }
1819
],
1920
"surroundingPairs": [
2021
["{", "}"],

org.eclipse.tm4e.language_pack/syntaxes/cpp/cpp.language-configuration.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
{ "open": "(", "close": ")" },
1515
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
1616
{ "open": "\"", "close": "\"", "notIn": ["string"] },
17-
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] }
17+
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
18+
{ "open": "/**", "close": " */", "notIn": ["string"] }
1819
],
1920
"surroundingPairs": [
2021
["{", "}"],

org.eclipse.tm4e.language_pack/syntaxes/cpp/cuda-cpp.language-configuration.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
{ "open": "(", "close": ")" },
1515
{ "open": "'", "close": "'", "notIn": ["string", "comment"] },
1616
{ "open": "\"", "close": "\"", "notIn": ["string"] },
17-
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] }
17+
{ "open": "/*", "close": "*/", "notIn": ["string", "comment"] },
18+
{ "open": "/**", "close": " */", "notIn": ["string"] }
1819
],
1920
"surroundingPairs": [
2021
["{", "}"],

org.eclipse.tm4e.language_pack/syntaxes/dart/dart.tmLanguage.json

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/dart-lang/dart-syntax-highlight/commit/272e2f89f85073c04b7e15b582257f76d2489970",
7+
"version": "https://github.com/dart-lang/dart-syntax-highlight/commit/bb8f7eebf5a1028e70dbebcf35cfef738dddc7fe",
88
"name": "Dart",
99
"scopeName": "source.dart",
1010
"patterns": [
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"name": "meta.declaration.dart",
17-
"begin": "^\\w*\\b(library|import|part of|part|export)\\b",
17+
"begin": "^\\w*\\b(augment\\s+library|library|import\\s+augment|import|part\\s+of|part|export)\\b",
1818
"beginCaptures": {
1919
"0": {
2020
"name": "keyword.other.import.dart"
@@ -208,7 +208,7 @@
208208
},
209209
{
210210
"name": "variable.language.dart",
211-
"match": "(?<!\\$)\\b(this|super)\\b(?!\\$)"
211+
"match": "(?<!\\$)\\b(this|super|augmented)\\b(?!\\$)"
212212
},
213213
{
214214
"name": "constant.numeric.dart",
@@ -328,11 +328,11 @@
328328
},
329329
{
330330
"name": "keyword.declaration.dart",
331-
"match": "(?<!\\$)\\b(abstract|sealed|base|interface|class|enum|extends|extension type|extension|external|factory|implements|get(?![(<])|mixin|native|operator|set(?![(<])|typedef|with|covariant)\\b(?!\\$)"
331+
"match": "(?<!\\$)\\b(abstract|sealed|base|interface|class|enum|extends|extension\\s+type|extension|external|factory|implements|get(?![(<])|mixin|native|operator|set(?![(<])|typedef|with|covariant)\\b(?!\\$)"
332332
},
333333
{
334334
"name": "storage.modifier.dart",
335-
"match": "(?<!\\$)\\b(static|final|const|required|late)\\b(?!\\$)"
335+
"match": "(?<!\\$)\\b(macro|augment|static|final|const|required|late)\\b(?!\\$)"
336336
},
337337
{
338338
"name": "storage.type.primitive.dart",
@@ -388,10 +388,33 @@
388388
}
389389
]
390390
},
391+
"expression": {
392+
"patterns": [
393+
{
394+
"include": "#constants-and-special-vars"
395+
},
396+
{
397+
"include": "#strings"
398+
},
399+
{
400+
"name": "variable.parameter.dart",
401+
"match": "[a-zA-Z0-9_]+"
402+
},
403+
{
404+
"begin": "\\{",
405+
"end": "\\}",
406+
"patterns": [
407+
{
408+
"include": "#expression"
409+
}
410+
]
411+
}
412+
]
413+
},
391414
"string-interp": {
392415
"patterns": [
393416
{
394-
"name": "string.interpolated.expression.dart",
417+
"name": "meta.embedded.expression.dart",
395418
"match": "\\$([a-zA-Z0-9_]+)",
396419
"captures": {
397420
"1": {
@@ -400,19 +423,12 @@
400423
}
401424
},
402425
{
403-
"name": "string.interpolated.expression.dart",
426+
"name": "meta.embedded.expression.dart",
404427
"begin": "\\$\\{",
405428
"end": "\\}",
406429
"patterns": [
407430
{
408-
"include": "#constants-and-special-vars"
409-
},
410-
{
411-
"include": "#strings"
412-
},
413-
{
414-
"name": "variable.parameter.dart",
415-
"match": "[a-zA-Z0-9_]+"
431+
"include": "#expression"
416432
}
417433
]
418434
},

org.eclipse.tm4e.language_pack/syntaxes/go/go.tmLanguage.json

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"If you want to provide a fix or improvement, please create a pull request against the original repository.",
55
"Once accepted there, we are happy to receive an update request."
66
],
7-
"version": "https://github.com/worlpaker/go-syntax/commit/6b7e1ad89c031a35a2bf8359538204bcef82f5be",
7+
"version": "https://github.com/worlpaker/go-syntax/commit/092c45ec9a51fe40188408d1371f123eaa4796fa",
88
"name": "Go",
99
"scopeName": "source.go",
1010
"patterns": [
@@ -32,6 +32,9 @@
3232
},
3333
{
3434
"include": "#group-variables"
35+
},
36+
{
37+
"include": "#field_hover"
3538
}
3639
]
3740
},
@@ -265,8 +268,18 @@
265268
},
266269
"language_constants": {
267270
"comment": "Language constants",
268-
"match": "\\b(true|false|nil|iota)\\b",
269-
"name": "constant.language.go"
271+
"match": "\\b(?:(true|false)|(nil)|(iota))\\b",
272+
"captures": {
273+
"1": {
274+
"name": "constant.language.boolean.go"
275+
},
276+
"2": {
277+
"name": "constant.language.null.go"
278+
},
279+
"3": {
280+
"name": "constant.language.iota.go"
281+
}
282+
}
270283
},
271284
"comments": {
272285
"patterns": [
@@ -2367,8 +2380,8 @@
23672380
},
23682381
{
23692382
"comment": "make keyword",
2370-
"match": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?(?:\\[(?:[^\\]]+)?\\])?(?:[\\w\\.\\*\\[\\]\\{\\}]+)?)?((?:\\,\\s*(?:[\\w\\.\\(\\)/\\+\\-\\<\\>\\&\\|\\%\\*]+)?)+)?(\\))))",
2371-
"captures": {
2383+
"begin": "(?:(\\bmake\\b)(?:(\\()((?:(?:(?:[\\*\\[\\]]+)?(?:\\<\\-\\s*)?\\bchan\\b(?:\\s*\\<\\-)?\\s*)+(?:\\([^\\)]+\\))?)?(?:[\\[\\]\\*]+)?(?:(?!\\bmap\\b)(?:[\\w\\.]+))?(\\[(?:(?:[\\S]+)(?:(?:\\,\\s*(?:[\\S]+))*))?\\])?(?:\\,)?)?))",
2384+
"beginCaptures": {
23722385
"1": {
23732386
"name": "entity.name.function.support.builtin.go"
23742387
},
@@ -2388,18 +2401,19 @@
23882401
"name": "entity.name.type.go"
23892402
}
23902403
]
2391-
},
2392-
"4": {
2393-
"patterns": [
2394-
{
2395-
"include": "$self"
2396-
}
2397-
]
2398-
},
2399-
"5": {
2404+
}
2405+
},
2406+
"end": "\\)",
2407+
"endCaptures": {
2408+
"0": {
24002409
"name": "punctuation.definition.end.bracket.round.go"
24012410
}
2402-
}
2411+
},
2412+
"patterns": [
2413+
{
2414+
"include": "$self"
2415+
}
2416+
]
24032417
}
24042418
]
24052419
},
@@ -2900,6 +2914,38 @@
29002914
}
29012915
}
29022916
},
2917+
"field_hover": {
2918+
"comment": "struct field property and types when hovering with the mouse",
2919+
"match": "(?:(?<=^\\bfield\\b)\\s+([\\w\\*\\.]+)\\s+([\\s\\S]+))",
2920+
"captures": {
2921+
"1": {
2922+
"patterns": [
2923+
{
2924+
"include": "#type-declarations"
2925+
},
2926+
{
2927+
"match": "\\w+",
2928+
"name": "variable.other.property.go"
2929+
}
2930+
]
2931+
},
2932+
"2": {
2933+
"patterns": [
2934+
{
2935+
"include": "#type-declarations"
2936+
},
2937+
{
2938+
"match": "\\binvalid\\b\\s+\\btype\\b",
2939+
"name": "invalid.field.go"
2940+
},
2941+
{
2942+
"match": "\\w+",
2943+
"name": "entity.name.type.go"
2944+
}
2945+
]
2946+
}
2947+
}
2948+
},
29032949
"other_variables": {
29042950
"comment": "all other variables",
29052951
"match": "\\w+",

org.eclipse.tm4e.language_pack/syntaxes/javascript/javascript.language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@
111111
},
112112
"indentationRules": {
113113
"decreaseIndentPattern": {
114-
"pattern": "^((?!.*?/\\*).*\\*\/)?\\s*[\\}\\]\\)].*$"
114+
"pattern": "^\\s*[\\}\\]\\)].*$"
115115
},
116116
"increaseIndentPattern": {
117-
"pattern": "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
117+
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
118118
},
119119
// e.g. * ...| or */| or *-----*/|
120120
"unIndentedLinePattern": {

org.eclipse.tm4e.language_pack/syntaxes/javascript/javascriptreact.language-configuration.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,10 @@
111111
},
112112
"indentationRules": {
113113
"decreaseIndentPattern": {
114-
"pattern": "^((?!.*?/\\*).*\\*\/)?\\s*[\\}\\]\\)].*$"
114+
"pattern": "^\\s*[\\}\\]\\)].*$"
115115
},
116116
"increaseIndentPattern": {
117-
"pattern": "^((?!//).)*(\\{([^}\"'`/]*|(\\t|[ ])*//.*)|\\([^)\"'`/]*|\\[[^\\]\"'`/]*)$"
117+
"pattern": "^.*(\\{[^}]*|\\([^)]*|\\[[^\\]]*)$"
118118
},
119119
// e.g. * ...| or */| or *-----*/|
120120
"unIndentedLinePattern": {

0 commit comments

Comments
 (0)