Skip to content

Commit 64e5ab2

Browse files
authored
added faultdef block (#19)
* rename keyword 'fault' to 'faultdef' * rollback fault and added new faultdef block
1 parent 546fd82 commit 64e5ab2

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

syntaxes/c3.tmLanguage.json

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,34 @@
355355
}
356356
]
357357
},
358+
{
359+
"begin": "\\b(faultdef)\\b",
360+
"beginCaptures": {
361+
"1": {
362+
"name": "keyword.declaration.faultdef.c3"
363+
}
364+
},
365+
"end": ";",
366+
"endCaptures": {
367+
"0": {
368+
"name": "punctuation.terminator.c3"
369+
}
370+
},
371+
"contentName": "meta.faultdef.c3",
372+
"patterns": [
373+
{
374+
"include": "#comments"
375+
},
376+
{
377+
"match": "\\b(?:_*[A-Z][_A-Z0-9]*)\\b",
378+
"name": "variable.other.constant"
379+
},
380+
{
381+
"match": ",",
382+
"name": "punctuation.separator.c3"
383+
}
384+
]
385+
},
358386
{
359387
"begin": "(?=\\binterface\\b)",
360388
"end": "(?<=\\})",

syntaxes/c3.tmLanguage.yml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,20 @@ repository:
175175
name: variable.other.enummember.c3
176176
- match: ','
177177
name: punctuation.separator.c3
178-
178+
# Faultdef
179+
- begin: '\b(faultdef)\b'
180+
beginCaptures:
181+
1: { name: keyword.declaration.faultdef.c3 }
182+
end: ';'
183+
endCaptures:
184+
0: { name: punctuation.terminator.c3 }
185+
contentName: meta.faultdef.c3
186+
patterns:
187+
- include: "#comments"
188+
- match: '\b{{CONST}}\b'
189+
name: variable.other.constant
190+
- match: ','
191+
name: punctuation.separator.c3
179192
# Interface
180193
- begin: '(?=\binterface\b)'
181194
end: (?<=\})

0 commit comments

Comments
 (0)