treehouse/static/syntax/toml.json

39 lines
1.2 KiB
JSON
Raw Normal View History

{
"comment": "NOTE: very incomplete. barely enough to highlight treehouse.toml",
"patterns": [
{ "regex": "#.*", "is": "comment" },
{
"regex": "(\"(?:\\\\\"|[^\"])*\"|[a-zA-Z0-9_\\-\\.]+)\\s*(=)",
"is": {
"default": "default",
"captures": ["ident", "operator"]
}
},
{
"regex": "(\\[)([a-zA-Z0-9_\\-\\.]+)(\\])",
"is": {
"default": "default",
"captures": ["punct", "keyword2", "punct"]
}
},
{
"regex": "(\\[\\[)([a-zA-Z0-9_\\-\\.]+)(\\]\\])",
"is": {
"default": "default",
"captures": ["punct", "keyword2", "punct"]
}
},
{ "regex": "\"\"\".*?\"\"\"", "is": "string", "flags": ["dotMatchesNewline"], "comment": "TODO: escaping" },
{ "regex": "'''.*?'''", "is": "string", "flags": ["dotMatchesNewline"], "comment": "TODO: escaping" },
{ "regex": "\"(\\\\\"|[^\"])*\"", "is": "string" },
{ "regex": "'.*?'", "is": "string" },
{ "regex": "[,\\(\\)\\[\\]\\{\\}]", "is": "punct" }
],
"keywords": {}
}