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,5 +1,6 @@
|
|||
Lua language support in Atom
|
||||
Candran language support in Atom
|
||||
======
|
||||
##### This package is an adaptation of [FireZenk's language-lua](https://github.com/FireZenk/language-lua) with [Candran](https://github.com/Reuh/candran) syntax.
|
||||
|
||||
Add syntax highlighting and snippets to Lua files in Atom.
|
||||
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
}
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
"name": "language-lua",
|
||||
"name": "language-candran",
|
||||
"version": "0.9.11",
|
||||
"private": false,
|
||||
"author": "FireZenk <firezenk@gmail.com>",
|
||||
"description": "Add syntax highlighting and snippets to Lua files in Atom",
|
||||
"repository": "https://github.com/FireZenk/language-lua",
|
||||
"author": "FireZenk <firezenk@gmail.com>, adapted for Candran by Reuh",
|
||||
"description": "Add syntax highlighting and snippets to Candran files in Atom",
|
||||
"repository": "https://github.com/Reuh/language-candran",
|
||||
"license": "MIT",
|
||||
"engines": {
|
||||
"atom": ">=0.50.0"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue