Skip to content

Commit c1ba74c

Browse files
authored
Merge pull request #14 from hypno2000/main
fix: remove redundant 'var' section from declaration and add path instead
2 parents 6e52182 + 08bb50c commit c1ba74c

File tree

2 files changed

+4
-34
lines changed

2 files changed

+4
-34
lines changed

syntaxes/c3.tmLanguage.json

+3-23
Original file line numberDiff line numberDiff line change
@@ -1200,29 +1200,6 @@
12001200
},
12011201
"declaration": {
12021202
"patterns": [
1203-
{
1204-
"begin": "\\bvar\\b",
1205-
"beginCaptures": {
1206-
"0": {
1207-
"name": "storage.type.var.c3"
1208-
}
1209-
},
1210-
"end": ";",
1211-
"endCaptures": {
1212-
"0": {
1213-
"name": "punctuation.terminator.c3"
1214-
}
1215-
},
1216-
"patterns": [
1217-
{
1218-
"match": "\\$(?:_*[A-Z][_A-Z0-9]*[a-z][_a-zA-Z0-9]*)",
1219-
"name": "support.type.c3"
1220-
},
1221-
{
1222-
"include": "#declaration_after_type"
1223-
}
1224-
]
1225-
},
12261203
{
12271204
"begin": "(?=\\$(typeof|typefrom|vatype|evaltype)\\b)",
12281205
"end": ";",
@@ -1240,6 +1217,9 @@
12401217
}
12411218
]
12421219
},
1220+
{
1221+
"include": "#path"
1222+
},
12431223
{
12441224
"begin": "(?=\\$?\\b(?:_*[A-Z][_A-Z0-9]*[a-z][_a-zA-Z0-9]*)\\b|\\b(?:void|bool|char|double|float|float16|int128|ichar|int|iptr|isz|long|short|uint128|uint|ulong|uptr|ushort|usz|float128|any|anyfault|typeid)\\b)",
12451225
"end": ";",

syntaxes/c3.tmLanguage.yml

+1-11
Original file line numberDiff line numberDiff line change
@@ -619,24 +619,14 @@ repository:
619619

620620
declaration:
621621
patterns:
622-
- begin: \bvar\b
623-
beginCaptures:
624-
0: { name: storage.type.var.c3 }
625-
end: ;
626-
endCaptures:
627-
0: { name: punctuation.terminator.c3 }
628-
patterns:
629-
# CT type
630-
- match: '\${{TYPE}}'
631-
name: support.type.c3
632-
- include: "#declaration_after_type"
633622
- begin: '(?=\$(typeof|typefrom|vatype|evaltype)\b)'
634623
end: ;
635624
endCaptures:
636625
0: { name: punctuation.terminator.c3 }
637626
patterns:
638627
- include: "#type"
639628
- include: "#declaration_after_type"
629+
- include: "#path"
640630
- begin: '(?=\$?\b{{TYPE}}\b|\b(?:{{base_type}})\b)'
641631
end: ;
642632
endCaptures:

0 commit comments

Comments
 (0)