aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-04-07 22:53:58 +0200
committerMarc André Tanner <mat@brain-dump.org>2016-04-07 22:55:41 +0200
commitdfaaf82f959180c0465c72ee542b221c2074ee4a (patch)
tree2194e1bcea7f22678b4613640e5190547fd7aeb8
parent7062a05be3bd595a2f8ef5b395360b5765744633 (diff)
downloadvis-dfaaf82f959180c0465c72ee542b221c2074ee4a.tar.gz
vis-dfaaf82f959180c0465c72ee542b221c2074ee4a.tar.xz
lexer: update to scintillua-3.6.4-2
-rw-r--r--lexers/elixir.lua2
-rw-r--r--lexers/javascript.lua12
-rw-r--r--lexers/rexx.lua4
3 files changed, 10 insertions, 8 deletions
diff --git a/lexers/elixir.lua b/lexers/elixir.lua
index 264f713..5ec27c0 100644
--- a/lexers/elixir.lua
+++ b/lexers/elixir.lua
@@ -2,7 +2,7 @@
-- Contributed by Richard Philips.
-- Elixer LPeg lexer.
-local l = lexer
+local l = require('lexer')
local token, style, color, word_match = l.token, l.style, l.color, l.word_match
local B, P, R, S = lpeg.B, lpeg.P, lpeg.R, lpeg.S
diff --git a/lexers/javascript.lua b/lexers/javascript.lua
index feb212b..f879948 100644
--- a/lexers/javascript.lua
+++ b/lexers/javascript.lua
@@ -18,9 +18,11 @@ local comment = token(l.COMMENT, line_comment + block_comment)
-- Strings.
local sq_str = l.delimited_range("'")
local dq_str = l.delimited_range('"')
+local template_str = l.delimited_range('`')
local regex_str = #P('/') * l.last_char_includes('+-*%^!=&|?:;,([{<>') *
l.delimited_range('/', true) * S('igm')^0
-local string = token(l.STRING, sq_str + dq_str) + token(l.REGEX, regex_str)
+local string = token(l.STRING, sq_str + dq_str + template_str) +
+ token(l.REGEX, regex_str)
-- Numbers.
local number = token(l.NUMBER, l.float + l.integer)
@@ -31,10 +33,10 @@ local keyword = token(l.KEYWORD, word_match{
'const', 'continue', 'debugger', 'default', 'delete', 'do', 'double', 'else',
'enum', 'export', 'extends', 'false', 'final', 'finally', 'float', 'for',
'function', 'goto', 'if', 'implements', 'import', 'in', 'instanceof', 'int',
- 'interface', 'let', 'long', 'native', 'new', 'null', 'package', 'private',
- 'protected', 'public', 'return', 'short', 'static', 'super', 'switch',
- 'synchronized', 'this', 'throw', 'throws', 'transient', 'true', 'try',
- 'typeof', 'var', 'void', 'volatile', 'while', 'with', 'yield'
+ 'interface', 'let', 'long', 'native', 'new', 'null', 'of', 'package',
+ 'private', 'protected', 'public', 'return', 'short', 'static', 'super',
+ 'switch', 'synchronized', 'this', 'throw', 'throws', 'transient', 'true',
+ 'try', 'typeof', 'var', 'void', 'volatile', 'while', 'with', 'yield'
})
-- Identifiers.
diff --git a/lexers/rexx.lua b/lexers/rexx.lua
index 582d86e..c750168 100644
--- a/lexers/rexx.lua
+++ b/lexers/rexx.lua
@@ -16,8 +16,8 @@ local block_comment = l.nested_pair('/*', '*/')
local comment = token(l.COMMENT, line_comment + block_comment)
-- Strings.
-local sq_str = l.delimited_range("'", true)
-local dq_str = l.delimited_range('"', true)
+local sq_str = l.delimited_range("'", true, true)
+local dq_str = l.delimited_range('"', true, true)
local string = token(l.STRING, sq_str + dq_str)
-- Numbers.