Changing langs format
This commit is contained in:
parent
82548835c2
commit
e54519611b
3 changed files with 30 additions and 10 deletions
|
@ -1,9 +1,14 @@
|
||||||
{
|
{
|
||||||
"comment": "#.+$",
|
"lang": {
|
||||||
"oper": "[+\\-<>!=`\\|&\\[\\]\\(\\):]",
|
"delim": ["[\\r\\n]",";","&&","\\|\\|","\\|"],
|
||||||
"cmd": "(?:^\\w+)|(?:`\\w+?`)|(?:$\\(\\w+?\\))|(?:\\|.*?\\w+)",
|
"strdelim": "[\"']"
|
||||||
"var": "(?:${\\w+?})|(?:$\\w+)",
|
},
|
||||||
"num": "(?:\\d+?\\.\\d+)|(?:\\d+)",
|
"comment": "(#.+)$",
|
||||||
"str": "[\\'\\\"].+?[\\'\\\"]",
|
"oper": "([+\\-<>!=`\\|&\\[\\]\\(\\):])",
|
||||||
"kw": "if|elif|else|fi|case|esac|set|let",
|
"cmd": "(?:^(\\w+))|(?:`(\\w+).*`)|(?:\\$\\((\\w+)\\))",
|
||||||
|
"var": "((?:\\${\\w+?})|(?:\\$\\w+))",
|
||||||
|
"num": "((?:\\d+?\\.\\d+)|(?:\\d+))",
|
||||||
|
"str": "(['\"].*?['\"])",
|
||||||
|
"kw": "(echo|printf|read|pushd|popd|dirs|if|elif|else|fi|case|esac|set|let|eval)",
|
||||||
|
"shebang": "(#!.+$)"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
{
|
{
|
||||||
"diff-i": "^\\+.*$",
|
"lang": {
|
||||||
"diff-d": "^\\-.*$",
|
"delim": ["\\d(?:,\\d)*[acd]\\d(?:,\\d)*\\s*"]
|
||||||
"diff-c": "^@@ -\\d+?,\\d+? \\+\\d+?,\\d+? @@"
|
},
|
||||||
|
"lexemes": {
|
||||||
|
"diff-i": "(>[\\s\\S]+)",
|
||||||
|
"diff-d": "(<[\\s\\S]+)",
|
||||||
|
"diff-c": "(<[\\s\\S]+?---\\s*>[\\s\\S]+)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
10
langs/unidiff.json
Normal file
10
langs/unidiff.json
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"lang": {
|
||||||
|
"delim": ["\\n"]
|
||||||
|
},
|
||||||
|
"lexemes": {
|
||||||
|
"diff-i": "^(\\+.*$)",
|
||||||
|
"diff-d": "^(\\-.*$)",
|
||||||
|
"diff-c": "^(@@ -\\d+?,\\d+? \\+\\d+?,\\d+? @@)"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue