diff options
Diffstat (limited to 'Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua')
-rw-r--r-- | Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua b/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua index fdec301bef2..855adbe4ea2 100644 --- a/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua +++ b/Master/texmf-dist/context/data/scite/lexers/scite-context-lexer-lua-longstring.lua @@ -1,20 +1,21 @@ local info = { version = 1.002, - comment = "scintilla lpeg lexer for lua", + comment = "scintilla lpeg lexer for lua longstrings", author = "Hans Hagen, PRAGMA-ADE, Hasselt NL", copyright = "PRAGMA ADE / ConTeXt Development Team", license = "see context related readme files", } -local lexer = lexer -local token = lexer.token -local P = lpeg.P - -local stringlexer = { _NAME = "lua-longstring", _FILENAME = "scite-context-lexer-lua-longstring" } -local whitespace = lexer.WHITESPACE +local lexer = require("lexer") -- require("scite-context-lexer") local context = lexer.context +local patterns = context.patterns + +local token = lexer.token + +local stringlexer = lexer.new("lua-longstring","scite-context-lexer-lua-longstring") +local whitespace = stringlexer.whitespace -local space = lexer.space +local space = patterns.space local nospace = 1 - space local p_spaces = token(whitespace, space ^1) @@ -25,6 +26,6 @@ stringlexer._rules = { { "string", p_string }, } -stringlexer._tokenstyles = lexer.context.styleset +stringlexer._tokenstyles = context.styleset return stringlexer |