Skip to content

Commit c76c6dc

Browse files
authored
Merge pull request #15 from hypno2000/main
fix: added back var pattern
2 parents 439716a + b04d7d3 commit c76c6dc

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

syntaxes/c3.tmLanguage.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1200,6 +1200,29 @@
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+
},
12031226
{
12041227
"begin": "(?=\\$(typeof|typefrom|vatype|evaltype)\\b)",
12051228
"end": ";",

syntaxes/c3.tmLanguage.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,17 @@ 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"
622633
- begin: '(?=\$(typeof|typefrom|vatype|evaltype)\b)'
623634
end: ;
624635
endCaptures:

0 commit comments

Comments
 (0)