feat: setup for intelliwacc ide with syntax highlights
This commit is contained in:
56
wacc-syntax/syntaxes/wacc.tmLanguage.json
Normal file
56
wacc-syntax/syntaxes/wacc.tmLanguage.json
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
|
||||
"name": "WACC",
|
||||
"scopeName": "source.wacc",
|
||||
"fileTypes": [
|
||||
"wacc"
|
||||
],
|
||||
"patterns": [
|
||||
{
|
||||
"match": "\\b(true|false)\\b",
|
||||
"name": "keyword.constant.wacc"
|
||||
},
|
||||
{
|
||||
"match": "\\b(int|bool|char|string|pair|null)\\b",
|
||||
"name": "storage.type.wacc"
|
||||
},
|
||||
{
|
||||
"match": "\".*?\"",
|
||||
"name": "string.quoted.double.mylang"
|
||||
},
|
||||
{
|
||||
"match": "\\b(begin|end)\\b",
|
||||
"name": "keyword.other.unit"
|
||||
},
|
||||
{
|
||||
"match": "\\b(if|then|else|fi|while|do|done|skip)\\b",
|
||||
"name": "keyword.control.wacc"
|
||||
},
|
||||
{
|
||||
"match": "\\b(read|free|print|println|newpair|call|fst|snd|ord|chr|len)\\b",
|
||||
"name": "keyword.operator.function.wacc"
|
||||
},
|
||||
{
|
||||
"match": "\\b(return|exit)\\b",
|
||||
"name": "keyword.operator.wacc"
|
||||
},
|
||||
{
|
||||
"match": "'[^']{1}'",
|
||||
"name": "constant.character.wacc"
|
||||
},
|
||||
{
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\s*(?=\\()",
|
||||
"name": "variable.function.wacc"
|
||||
},
|
||||
{
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)\\b",
|
||||
"name": "variable.other.wacc"
|
||||
},
|
||||
{
|
||||
"match": "#.*$",
|
||||
"name": "comment.line"
|
||||
}
|
||||
|
||||
]
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user