You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
257 lines
8.2 KiB
JSON
257 lines
8.2 KiB
JSON
{
|
|
"lexemes": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?",
|
|
"keywords": "and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0",
|
|
"contains": [
|
|
{
|
|
"className": "string",
|
|
"contains": [
|
|
{
|
|
"begin": "\\\\[\\s\\S]",
|
|
"relevance": 0
|
|
},
|
|
{
|
|
"className": "subst",
|
|
"begin": "#\\{",
|
|
"end": "}",
|
|
"lexemes": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?",
|
|
"keywords": "and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote require import with|0",
|
|
"contains": {
|
|
"$ref": "#contains"
|
|
}
|
|
}
|
|
],
|
|
"variants": [
|
|
{
|
|
"begin": "\"\"\"",
|
|
"end": "\"\"\""
|
|
},
|
|
{
|
|
"begin": "'''",
|
|
"end": "'''"
|
|
},
|
|
{
|
|
"begin": "~S\"\"\"",
|
|
"end": "\"\"\"",
|
|
"contains": []
|
|
},
|
|
{
|
|
"begin": "~S\"",
|
|
"end": "\"",
|
|
"contains": []
|
|
},
|
|
{
|
|
"begin": "~S'''",
|
|
"end": "'''",
|
|
"contains": []
|
|
},
|
|
{
|
|
"begin": "~S'",
|
|
"end": "'",
|
|
"contains": []
|
|
},
|
|
{
|
|
"begin": "'",
|
|
"end": "'"
|
|
},
|
|
{
|
|
"begin": "\"",
|
|
"end": "\""
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"className": "string",
|
|
"begin": "~[A-Z](?=[\/|([{<\"'])",
|
|
"contains": [
|
|
{
|
|
"begin": "\"",
|
|
"end": "\""
|
|
},
|
|
{
|
|
"begin": "'",
|
|
"end": "'"
|
|
},
|
|
{
|
|
"begin": "\\\/",
|
|
"end": "\\\/"
|
|
},
|
|
{
|
|
"begin": "\\|",
|
|
"end": "\\|"
|
|
},
|
|
{
|
|
"begin": "\\(",
|
|
"end": "\\)"
|
|
},
|
|
{
|
|
"begin": "\\[",
|
|
"end": "\\]"
|
|
},
|
|
{
|
|
"begin": "\\{",
|
|
"end": "\\}"
|
|
},
|
|
{
|
|
"begin": "\\<",
|
|
"end": "\\>"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"className": "string",
|
|
"begin": "~[a-z](?=[\/|([{<\"'])",
|
|
"contains": [
|
|
{
|
|
"endsParent": true,
|
|
"contains": [
|
|
{
|
|
"contains": [
|
|
{
|
|
"$ref": "#contains.0.contains.0"
|
|
},
|
|
{
|
|
"$ref": "#contains.0.contains.1"
|
|
}
|
|
],
|
|
"variants": [
|
|
{
|
|
"begin": "\"",
|
|
"end": "\""
|
|
},
|
|
{
|
|
"begin": "'",
|
|
"end": "'"
|
|
},
|
|
{
|
|
"begin": "\\\/",
|
|
"end": "\\\/"
|
|
},
|
|
{
|
|
"begin": "\\|",
|
|
"end": "\\|"
|
|
},
|
|
{
|
|
"begin": "\\(",
|
|
"end": "\\)"
|
|
},
|
|
{
|
|
"begin": "\\[",
|
|
"end": "\\]"
|
|
},
|
|
{
|
|
"begin": "\\{",
|
|
"end": "\\}"
|
|
},
|
|
{
|
|
"begin": "<",
|
|
"end": ">"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"className": "comment",
|
|
"begin": "#",
|
|
"end": "$",
|
|
"contains": [
|
|
{
|
|
"begin": "\\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\\b"
|
|
},
|
|
{
|
|
"className": "doctag",
|
|
"begin": "(?:TODO|FIXME|NOTE|BUG|XXX):",
|
|
"relevance": 0
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"className": "class",
|
|
"beginKeywords": "defimpl defmodule defprotocol defrecord",
|
|
"end": "\\bdo\\b|$|;",
|
|
"contains": [
|
|
{
|
|
"className": "title",
|
|
"begin": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?",
|
|
"relevance": 0,
|
|
"endsParent": true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"className": "function",
|
|
"beginKeywords": "def defp defmacro",
|
|
"end": "\\B\\b",
|
|
"contains": {
|
|
"$ref": "#contains.4.contains"
|
|
}
|
|
},
|
|
{
|
|
"begin": "::"
|
|
},
|
|
{
|
|
"className": "symbol",
|
|
"begin": ":(?![\\s:])",
|
|
"contains": [
|
|
{
|
|
"$ref": "#contains.0"
|
|
},
|
|
{
|
|
"begin": "[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-\/+%^&*~`|]|\\[\\]=?"
|
|
}
|
|
],
|
|
"relevance": 0
|
|
},
|
|
{
|
|
"className": "symbol",
|
|
"begin": "[a-zA-Z_][a-zA-Z0-9_.]*(\\!|\\?)?:(?!:)",
|
|
"relevance": 0
|
|
},
|
|
{
|
|
"className": "number",
|
|
"begin": "(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[1-9][0-9_]*(.[0-9_]+([eE][-+]?[0-9]+)?)?)",
|
|
"relevance": 0
|
|
},
|
|
{
|
|
"className": "variable",
|
|
"begin": "(\\$\\W)|((\\$|\\@\\@?)(\\w+))"
|
|
},
|
|
{
|
|
"begin": "->"
|
|
},
|
|
{
|
|
"begin": "(!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|\/=|\/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~)\\s*",
|
|
"contains": [
|
|
{
|
|
"$ref": "#contains.3"
|
|
},
|
|
{
|
|
"className": "regexp",
|
|
"illegal": "\\n",
|
|
"contains": [
|
|
{
|
|
"$ref": "#contains.0.contains.0"
|
|
},
|
|
{
|
|
"$ref": "#contains.0.contains.1"
|
|
}
|
|
],
|
|
"variants": [
|
|
{
|
|
"begin": "\/",
|
|
"end": "\/[a-z]*"
|
|
},
|
|
{
|
|
"begin": "%r\\[",
|
|
"end": "\\][a-z]*"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"relevance": 0
|
|
}
|
|
]
|
|
}
|