mirror of
https://github.com/Reuh/language-candran.git
synced 2025-10-27 12:19:30 +00:00
Candran 0.4.0 syntax
This commit is contained in:
parent
8f5e15b3b3
commit
bf0b889855
3 changed files with 23 additions and 14 deletions
|
|
@ -1,13 +1,10 @@
|
|||
'comment': 'Lua Syntax: version 0.8'
|
||||
'comment': 'Candran Syntax: version 0.8'
|
||||
'fileTypes': [
|
||||
'lua'
|
||||
'nse'
|
||||
'rockspec'
|
||||
'luacheckrc'
|
||||
'lakefile'
|
||||
'can'
|
||||
'candran'
|
||||
]
|
||||
'firstLineMatch': '\\A#!.*?\\blua\\b'
|
||||
'name': 'Lua'
|
||||
'firstLineMatch': '\\A#!.*?\\bcan\\b'
|
||||
'name': 'Candran'
|
||||
'patterns': [
|
||||
{
|
||||
'captures':
|
||||
|
|
@ -26,6 +23,17 @@
|
|||
'match': '\\b(function)(?:\\s+([a-zA-Z_.:]+[.:])?([a-zA-Z_]\\w*)\\s*)?(\\()([^)]*)(\\))'
|
||||
'name': 'meta.function.lua'
|
||||
}
|
||||
{
|
||||
'captures':
|
||||
'1':
|
||||
'name': 'punctuation.definition.parameters.begin.lua'
|
||||
'2':
|
||||
'name': 'variable.parameter.function.lua'
|
||||
'3':
|
||||
'name': 'punctuation.definition.parameters.end.lua'
|
||||
'match': '(?<!function|\\w|\\s)\\s*(\\()((?:\\s*[\\w]+\\s*(?:=\\s*[^,]+?)?,?)*)(\\))'
|
||||
'name': 'meta.function.lua'
|
||||
}
|
||||
{
|
||||
'match': '(?<![\\d.])\\s0x[a-fA-F\\d]+|\\b\\d+(\\.\\d+)?([eE]-?\\d+)?|\\.\\d+([eE]-?\\d+)?'
|
||||
'name': 'constant.numeric.lua'
|
||||
|
|
@ -133,7 +141,7 @@
|
|||
]
|
||||
}
|
||||
{
|
||||
'match': '\\b(and|or|not|break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in|goto)\\b'
|
||||
'match': '\\b(and|or|not|break|do|else|for|if|elseif|return|then|repeat|while|until|end|function|local|in|goto|continue|let)\\b'
|
||||
'name': 'keyword.control.lua'
|
||||
}
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue