opengoal-vscode/syntaxes/opengoal.tmLanguage.json
2022-03-15 01:36:54 -04:00

102 lines
1.9 KiB
JSON

{
"$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json",
"name": "OpenGOAL",
"patterns": [
{
"include": "#comments"
},
{
"include": "#readerMacros"
},
{
"include": "#functionsAndMacros"
},
{
"include": "#keywords"
},
{
"include": "#strings"
}
],
"repository": {
"comments": {
"patterns": [
{
"name": "comment.opengoal",
"begin": ";+",
"end": "$"
},
{
"name": "comment.block.opengoal",
"begin": "#\\|",
"end": "\\|#"
}
]
},
"readerMacros": {
"patterns": [
{
"match": "(')(\\b|\\()",
"captures": {
"1": {
"name": "keyword.operator.quote.opengoal"
}
}
},
{
"match": "(,)(\\b|\\()",
"captures": {
"1": {
"name": "keyword.operator.unquote.opengoal"
}
}
},
{
"match": "(,@)(\\b|\\()",
"captures": {
"1": {
"name": "keyword.operator.unquoteSplicing.opengoal"
}
}
}
]
},
"keywords": {
"patterns": [
{
"name": "keyword.opengoal",
"match": ":\\b\\w*"
}
]
},
"functionsAndMacros": {
"patterns": [
{
"match": "\\(\\s*(define|defun|defmacro|defstep|define-extern|defmethod)\\b",
"captures": {
"1": {
"name": "entity.name.function.builtin"
}
}
}
]
},
"strings": {
"patterns": [
{
"name": "string.quoted.double.opengoal",
"begin": "\"",
"end": "\"",
"patterns": [
{
"name": "constant.character.escape.opengoal",
"match": "\\\\."
}
]
}
]
}
},
"scopeName": "source.opengoal"
}