diff options
author | Hans Hagen <pragma@wxs.nl> | 2014-04-24 09:39:00 +0200 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2014-04-24 09:39:00 +0200 |
commit | 7b9068a1cac76b9c661a825f3409c39ed6787a7a (patch) | |
tree | 8d51cab5d15e28c10ef158dfd682d60e7c3f01de /context/data/scite/lexers/scite-context-lexer-txt.lua | |
parent | dbde719e7593a47d67acd0fdc0aa48a0ea55c6e5 (diff) | |
download | context-7b9068a1cac76b9c661a825f3409c39ed6787a7a.tar.gz |
beta 2014.04.24 09:39
Diffstat (limited to 'context/data/scite/lexers/scite-context-lexer-txt.lua')
-rw-r--r-- | context/data/scite/lexers/scite-context-lexer-txt.lua | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/context/data/scite/lexers/scite-context-lexer-txt.lua b/context/data/scite/lexers/scite-context-lexer-txt.lua index fe062fb94..86570ae64 100644 --- a/context/data/scite/lexers/scite-context-lexer-txt.lua +++ b/context/data/scite/lexers/scite-context-lexer-txt.lua @@ -6,22 +6,23 @@ local info = { license = "see context related readme files", } -if not lexer._CONTEXTEXTENSIONS then require("scite-context-lexer") end - -local lexer = lexer -local token = lexer.token local P, S, Cmt, Cp, Ct = lpeg.P, lpeg.S, lpeg.Cmt, lpeg.Cp, lpeg.Ct local find, match = string.find, string.match -local textlexer = { _NAME = "txt", _FILENAME = "scite-context-lexer-txt" } -local whitespace = lexer.WHITESPACE +local lexer = require("lexer") local context = lexer.context +local patterns = context.patterns + +local token = lexer.token + +local textlexer = lexer.new("txt","scite-context-lexer-txt") +local whitespace = textlexer.whitespace -local space = lexer.space -local any = lexer.any +local space = patterns.space +local any = patterns.any +local wordtoken = patterns.wordtoken +local wordpattern = patterns.wordpattern -local wordtoken = context.patterns.wordtoken -local wordpattern = context.patterns.wordpattern local checkedword = context.checkedword local styleofword = context.styleofword local setwordlist = context.setwordlist |