{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "WAVE",
"patterns": [
{ "include": "#comment" },
{ "include": "#raw-keyword"},
{ "include": "#number" },
{ "include": "#keyword-constant" },
{ "include": "#keyword-label" },
{ "include": "#label" },
{ "include": "#char" },
{ "include": "#string" }
],
"repository": {
"comment": {
"patterns": [{
"name": "comment.line.double-slash.wave",
"match": "(//)[^\\n]*",
"captures": {
"1": {
"name": "punctuation.definition.comment.wave"
}
}
}]
},
"raw-keyword": {
"patterns": [{
"name": "variable.other.label.wave",
"match": "%(true|false|some|none|ok|err|inf|nan)\\b"
}]
},
"number": {
"patterns": [
{
"name": "constant.numeric.wave",
"match": "-?(0|([1-9][0-9]*))(\\.[0-9]+)?([eE][-+]?[0-9]+)?"
},
{
"name": "constant.numeric.wave",
"match": "\\b(nan|inf|-inf)\\b"
}
]
},
"keyword-constant": {
"patterns": [{
"name": "constant.language.wave",
"match": "\\b(true|false)\\b"
}]
},
"keyword-label": {
"patterns": [{
"name": "variable.language.label.wave",
"match": "\\b(some|none|ok|err)\\b"
}]
},
"label": {
"patterns": [{
"name": "variable.other.label.wave",
"match": "\\b%?([a-z][a-z0-9]*|[A-Z][A-Z0-9]*)(-([a-z][a-z0-9]*|[A-Z][A-Z0-9]*))*\\b"
}]
},
"char": {
"name": "constant.character.wave",
"begin": "'",
"end": "'",
"patterns": [{ "include": "#char-escape" }]
},
"string": {
"name": "string.quoted.double.wave",
"begin": "\"",
"end": "\"",
"patterns": [{ "include": "#char-escape"}]
},
"char-escape": {
"name": "constant.character.escape.wave",
"match": "\\\\(['\"tnr\\\\]|u\\{[0-9a-fA-F]+\\})"
}
},
"scopeName": "source.wave"
}