commit
c7070c2d01
10
mode/lua.py
10
mode/lua.py
|
@ -14,12 +14,14 @@ word = chr1 + chr2 + '*'
|
|||
|
||||
class LuaGrammar(Grammar):
|
||||
rules = [
|
||||
PatternRule('comment', r'--.*$'),
|
||||
PatternRule('spaces', r' +'),
|
||||
RegionRule('comment', r'--\[(?P<level>=*)\[', Grammar, r'\]%(level)s\]'),
|
||||
#RegionRule('comment', r'--\[\[', Grammar, r'\]\]'),
|
||||
PatternRule('comment', '--.*$'),
|
||||
PatternRule('spaces', ' +'),
|
||||
PatternRule('eol', r'\n'),
|
||||
|
||||
RegionRule('lua.string', r"'", StringGrammar1, r"'"),
|
||||
RegionRule('lua.string', r'"', StringGrammar2, r'"'),
|
||||
RegionRule('lua.string', "'", StringGrammar1, "'"),
|
||||
RegionRule('lua.string', '"', StringGrammar2, '"'),
|
||||
|
||||
PatternMatchRule('x', '(function)( +)(' + word + ')',
|
||||
'lua.keyword', 'spaces', 'lua.function'),
|
||||
|
|
Loading…
Reference in New Issue