summaryrefslogtreecommitdiff
path: root/context/data/scite/lexers/scite-context-lexer-lua.lua
diff options
context:
space:
mode:
authorMarius <mariausol@gmail.com>2013-10-20 01:21:09 +0300
committerMarius <mariausol@gmail.com>2013-10-20 01:21:09 +0300
commitb8ac6d7b7fdb16293c28034c349efd5b0b7b20b3 (patch)
tree0e9051dbe21b4e9cfc72fe594df5b0fe7bc511f3 /context/data/scite/lexers/scite-context-lexer-lua.lua
parent965214d981e6129b782c67adcaf3a81aedcb0bac (diff)
downloadcontext-b8ac6d7b7fdb16293c28034c349efd5b0b7b20b3.tar.gz
beta 2013.10.20 07:09
Diffstat (limited to 'context/data/scite/lexers/scite-context-lexer-lua.lua')
-rw-r--r--context/data/scite/lexers/scite-context-lexer-lua.lua11
1 files changed, 8 insertions, 3 deletions
diff --git a/context/data/scite/lexers/scite-context-lexer-lua.lua b/context/data/scite/lexers/scite-context-lexer-lua.lua
index 9672e110e..4c276b1bb 100644
--- a/context/data/scite/lexers/scite-context-lexer-lua.lua
+++ b/context/data/scite/lexers/scite-context-lexer-lua.lua
@@ -47,15 +47,17 @@ local functions = {
local constants = {
'_G', '_VERSION', '_M', '...', '_ENV',
-- here too
- '__add', '__call', '__concat', '__div', '__eq', '__gc', '__index',
+ '__add', '__call', '__concat', '__div', '__idiv', '__eq', '__gc', '__index',
'__le', '__lt', '__metatable', '__mode', '__mul', '__newindex',
- '__pow', '__sub', '__tostring', '__unm',
+ '__pow', '__sub', '__tostring', '__unm', '__len',
+ '__pairs', '__ipairs',
+ 'NaN',
}
local internals = { -- __
'add', 'call', 'concat', 'div', 'eq', 'gc', 'index',
'le', 'lt', 'metatable', 'mode', 'mul', 'newindex',
- 'pow', 'sub', 'tostring', 'unm',
+ 'pow', 'sub', 'tostring', 'unm', 'len',
}
local depricated = {
@@ -154,6 +156,9 @@ local number = token("number", lexer.float + integer)
local validword = R("AZ","az","__") * R("AZ","az","__","09")^0
+local utf8character = P(1) * R("\128\191")^1
+local validword = (R("AZ","az","__") + utf8character) * (R("AZ","az","__","09") + utf8character)^0
+
local identifier = token("default",validword)
----- operator = token("special", P('..') + P('~=') + S('+-*/%^#=<>;:,.{}[]()')) -- maybe split off {}[]()