diff options
author | Tim Hatch <tim@timhatch.com> | 2012-11-05 15:40:43 -0800 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2012-11-05 15:40:43 -0800 |
commit | 72a60d9fbde9e42376f28bc4cbdd7f16d9c09c91 (patch) | |
tree | eb233d6b5e0b7c540d69d86b6aa807d7fc84e880 /pygments | |
parent | d22ab12a6245d7415ecb0a75c9cdfb62457e9289 (diff) | |
download | pygments-72a60d9fbde9e42376f28bc4cbdd7f16d9c09c91.tar.gz |
Fix regexlint-noticed problems in Monkey lexer
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/compiled.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index c1ea8c03..e7982052 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -3129,7 +3129,7 @@ class MonkeyLexer(RegexLexer): # Array (r'[\[\]]', Punctuation), # Other - (r'<=|>=|<>|[*]=|/=|[+]=|-=|&=|~=|[|]=|[-&*/^+=<>]', Operator), + (r'<=|>=|<>|[*]=|/=|[+]=|-=|&=|~=|\[|\]=|[-&*/^+=<>]', Operator), (r'(?i)(?:Not|Mod|Shl|Shr|And|Or)', Operator.Word), (r'[\(\){}!#,.:]', Punctuation), # catch the rest @@ -3149,7 +3149,8 @@ class MonkeyLexer(RegexLexer): (r'%s\b' % keyword_type, Keyword.Type), (r'%s\b' % name_class, Name.Class), # array (of given size) - (r'(\[)\s*(\d*)\s*(\])', bygroups(Punctuation, Number.Integer, Punctuation)), + (r'(\[)(\s*)(\d*)(\s*)(\])', + bygroups(Punctuation, Text, Number.Integer, Text, Punctuation)), # generics (r'\s+(?!<)', Text, '#pop'), (r'<', Punctuation, '#push'), @@ -3168,13 +3169,13 @@ class MonkeyLexer(RegexLexer): ], 'string': [ (r'[^"~]+', String.Double), - (r'~q|~n|~r|~r|~t|~z|~~', String.Escape), + (r'~q|~n|~r|~t|~z|~~', String.Escape), (r'"', String.Double, '#pop'), ], 'comment' : [ (r'(?i)^#rem.*?', Comment.Multiline, "#push"), (r'(?i)^#end.*?', Comment.Multiline, "#pop"), (r'\n', Comment.Multiline), - (r'.*', Comment.Multiline), + (r'.+', Comment.Multiline), ], - }
\ No newline at end of file + } |