basic language support for sublime and vscode
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
{
|
||||
"scopeName": "source.noja",
|
||||
"fileTypes": ["noja"],
|
||||
"patterns" : [
|
||||
{
|
||||
"name" : "keyword.control.noja",
|
||||
"match": "\\b(return|if|else|while|do|break|continue)\\b"
|
||||
},
|
||||
{
|
||||
"match": "\\b(fun)\\b[ \\t\\n]*([a-zA-Z_][a-zA-Z0-9_]*)?\\b",
|
||||
"captures": {
|
||||
"1": {"name": "keyword.control.noja"},
|
||||
"2": {"name": "entity.name.function"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.word.noja",
|
||||
"match": "\\b(and|or|not)\\b"
|
||||
},
|
||||
{
|
||||
"name": "keyword.operator.noja",
|
||||
"match": "(\\+|-|\\*|\\/|=|==|!=|\\>|\\<|\\>=|\\<=|\\|)"
|
||||
},
|
||||
{
|
||||
"name": "constant.language.noja",
|
||||
"match": "\\b(none|any|true|false)\\b"
|
||||
},
|
||||
{
|
||||
"name" : "string.quoted.double.noja",
|
||||
"begin": "\"",
|
||||
"end" : "\"",
|
||||
"patterns": [
|
||||
{
|
||||
"name" : "constant.character.escape.noja",
|
||||
"match": "\\."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name" : "string.quoted.single.noja",
|
||||
"begin": "'",
|
||||
"end" : "'",
|
||||
"patterns": [
|
||||
{
|
||||
"name" : "constant.character.escape.noja",
|
||||
"match": "\\."
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.float.noja",
|
||||
"match": "[0-9]+\\.[0-9]+"
|
||||
},
|
||||
{
|
||||
"name": "constant.numeric.integer.noja",
|
||||
"match": "[0-9]+"
|
||||
},
|
||||
{
|
||||
"name": "storage.type.noja",
|
||||
"match": "\\b(int|float|bool|[_A-Z][A-Za-z0-9_]*)\\b"
|
||||
},
|
||||
{
|
||||
"match": "\\b([a-zA-Z_][a-zA-Z0-9_]*)[ \\t\\n]*\\(",
|
||||
"captures": {
|
||||
"1": {"name": "variable.function.noja"}
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "variable.other.noja",
|
||||
"match": "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b"
|
||||
},
|
||||
{
|
||||
"name": "comment.line.number-sign",
|
||||
"match": "#.*$"
|
||||
},
|
||||
{
|
||||
"name": "punctuation.separator.noja",
|
||||
"match": "(,|:)"
|
||||
},
|
||||
{
|
||||
"name": "punctuation.accessor.dot.noja",
|
||||
"match": "\\."
|
||||
},
|
||||
{
|
||||
"name": "punctuation.terminator.noja",
|
||||
"match": ";"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user