add bare bones TOML syntax
just for the following post so it's pretty shitty
This commit is contained in:
parent
80c6b90f9b
commit
1170829d2d
2 changed files with 151 additions and 0 deletions
38
static/syntax/toml.json
Normal file
38
static/syntax/toml.json
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
"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": {}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue