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": "#.+$",
|
||||
"oper": "[+\\-<>!=`\\|&\\[\\]\\(\\):]",
|
||||
"cmd": "(?:^\\w+)|(?:`\\w+?`)|(?:$\\(\\w+?\\))|(?:\\|.*?\\w+)",
|
||||
"var": "(?:${\\w+?})|(?:$\\w+)",
|
||||
"num": "(?:\\d+?\\.\\d+)|(?:\\d+)",
|
||||
"str": "[\\'\\\"].+?[\\'\\\"]",
|
||||
"kw": "if|elif|else|fi|case|esac|set|let",
|
||||
"lang": {
|
||||
"delim": ["[\\r\\n]",";","&&","\\|\\|","\\|"],
|
||||
"strdelim": "[\"']"
|
||||
},
|
||||
"comment": "(#.+)$",
|
||||
"oper": "([+\\-<>!=`\\|&\\[\\]\\(\\):])",
|
||||
"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": "^\\+.*$",
|
||||
"diff-d": "^\\-.*$",
|
||||
"diff-c": "^@@ -\\d+?,\\d+? \\+\\d+?,\\d+? @@"
|
||||
"lang": {
|
||||
"delim": ["\\d(?:,\\d)*[acd]\\d(?:,\\d)*\\s*"]
|
||||
},
|
||||
"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