-
Notifications
You must be signed in to change notification settings - Fork 158
/
lua.nanorc
35 lines (33 loc) · 1.83 KB
/
lua.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
syntax "lua" "\.lua$"
#header "^#!.*lua(jit)?$"
FUNCTION: "function\s+[A-Za-z0-9.:]+\s*\("
FUNCTION: "\<(assert|collectgarbage|dofile|error|getmetatable|ipairs|load|loadfile|module|next|pairs|pcall|print|rawequal|rawget|rawset|require|select|setmetatable|tonumber|tostring|type|unpack|xpcall)\s*\("
FUNCTION: "io\.\<(close|flush|input|lines|open|output|popen|read|tmpfile|type|write|stdin|stdout|stderr)\>"
FUNCTION: "\:\<(close|flush|lines|read|seek|setvbuf|write)\>"
FUNCTION: "math\.\<(abs|acos|asin|atan2|atan|ceil|cosh|cos|deg|exp|floor|fmod|frexp|huge|ldexp|log10|log|max|min|mod|modf|pi|pow|rad|random|randomseed|sinh|tan)\>"
FUNCTION: "os\.\<(clock|date|difftime|execute|exit|getenv|remove|rename|setlocale|time|tmpname)\>"
FUNCTION: "package\.\<(cpath|loaded|loadlib|path|preload|seeall)\>"
FUNCTION: "string\.\<(byte|char|dump|find|format|gmatch|gsub|len|lower|match|rep|reverse|sub|upper)\>"
FUNCTION: "table\.\<(concat|insert|maxn|remove|sort)\>"
FUNCTION: "coroutine\.\<(create|resume|running|status|wrap|yield)\>"
FUNCTION: "debug\.\<(debug|gethook|getinfo|getlocal|getmetatable|getregistry|getupvalue|sethook|setlocal|setmetatable|setupvalue|traceback)\>"
KEYWORD: "\<(do|end|while|repeat|until|if|elseif|then|else|for|in|function|local|return|break)\>"
OPERATOR: ":|\*|/|%|\+|-|\^|>|>=|<|<=|~=|=|#|\.\.|\<(not|and|or)\>"
OPERATOR: "(\(|\)|\[|\]|\{|\})"
PLAIN: "\.{3,}"
BOOLEAN: "\<(false|nil|true)\>"
NUMBER: "\<([0-9]+)\>"
NUMBER: "0x[0-9a-fA-F]*"
STRING: "\"(\\.|[^\\\"])*\"|'(\\.|[^\\'])*'"
STRING: start="\[\[" end="\]\]"
STRING: start="\[=\[" end="\]=\]"
STRING: start="\[==\[" end="\]==\]"
ESCAPE: "\\[0-9]{3}"
ESCAPE: "\\[abefntrv]"
ESCAPE: "\\('|\"|\[|\]|\\)"
COMMENT: "^#!.*"
COMMENT: "(^|\s)\-\-.*$"
COMMENT: start="\-\-\[\[" end="\]\]"
COMMENT: start="\-\-\[=\[" end="\]=\]"
COMMENT: start="\-\-\[==\[" end="\]==\]"
+LINT