diff options
author | Georg Brandl <georg@python.org> | 2014-10-16 09:33:43 +0200 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-10-16 09:33:43 +0200 |
commit | 5727fe42393a86817bd0f702d93c3fc399b68eb3 (patch) | |
tree | 796e787baf37e7362a802aaf9b6303127ff35098 /pygments/lexers/actionscript.py | |
parent | f8f38adf82e18ea5c33d532ab3429bb22eed0921 (diff) | |
download | pygments-5727fe42393a86817bd0f702d93c3fc399b68eb3.tar.gz |
Fix "matches empty string" complaints from regexlint.
Diffstat (limited to 'pygments/lexers/actionscript.py')
-rw-r--r-- | pygments/lexers/actionscript.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/pygments/lexers/actionscript.py b/pygments/lexers/actionscript.py index 9a33dc18..d15b1338 100644 --- a/pygments/lexers/actionscript.py +++ b/pygments/lexers/actionscript.py @@ -11,7 +11,7 @@ import re -from pygments.lexer import RegexLexer, bygroups, using, this, words +from pygments.lexer import RegexLexer, bygroups, using, this, words, default from pygments.token import Text, Comment, Operator, Keyword, Name, String, \ Number, Punctuation @@ -179,12 +179,14 @@ class ActionScript3Lexer(RegexLexer): 'type': [ (r'(\s*)(:)(\s*)(' + typeidentifier + r'|\*)', bygroups(Text, Operator, Text, Keyword.Type), '#pop:2'), - (r'\s*', Text, '#pop:2') + (r'\s+', Text, '#pop:2'), + default('#pop:2') ], 'defval': [ (r'(=)(\s*)([^(),]+)(\s*)(,?)', bygroups(Operator, Text, using(this), Text, Operator), '#pop'), - (r',?', Operator, '#pop') + (r',', Operator, '#pop'), + default('#pop') ] } |