diff options
author | Unknown <ciri@ciri.pl> | 2014-04-14 20:10:57 +0200 |
---|---|---|
committer | Unknown <ciri@ciri.pl> | 2014-04-14 20:10:57 +0200 |
commit | a9811c3e3434b80cc05cdafe7fcbfaaaa134a20e (patch) | |
tree | 9c85875dfcfcc8c9bc2d76163ea71c715db4adcf /pygments | |
parent | 11fbd47baffb8412466b4ba9865370193ad3df80 (diff) | |
download | pygments-a9811c3e3434b80cc05cdafe7fcbfaaaa134a20e.tar.gz |
Fixed #195 - used regexlint
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/other.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index f3e8c920..d6e2c7be 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -3910,12 +3910,12 @@ class AmbientTalkLexer(RegexLexer): (r'"(\\\\|\\"|[^"])*"', String), (r'\|', Punctuation, 'arglist'), (r'<:|[\^\*!%&<>+=,./?-]|:=', Operator), - (r"`\w[\w\d]*", String.Symbol), - (r"\w[\w\d]*:", Name.Function), + (r"`[a-zA-Z_][a-zA-Z0-9_]*", String.Symbol), + (r"[a-zA-Z_][a-zA-Z0-9_]*:", Name.Function), (r"[\{\}()\[\];`]", Punctuation), (r'(self|super)\b', Name.Variable.Instance), - (r"\w[\w\d]*", Name.Variable), - (r"@\w[\w\d]*", Name.Class), + (r"[a-zA-Z_][a-zA-Z0-9_]*", Name.Variable), + (r"@[a-zA-Z_][a-zA-Z0-9_]*", Name.Class), (r"@\[", Name.Class, 'annotations'), include('numbers'), ], @@ -3924,9 +3924,9 @@ class AmbientTalkLexer(RegexLexer): (r'\d+', Number.Integer) ], 'namespace': [ - (r'\w[\w\d]*\.', Name.Namespace), - (r'\w[\w\d]*:', Name.Function , '#pop'), - (r'\w[\w\d]*(?!\.)', Name.Function , '#pop') + (r'[a-zA-Z_][a-zA-Z0-9_]*\.', Name.Namespace), + (r'[a-zA-Z_][a-zA-Z0-9_]*:', Name.Function , '#pop'), + (r'[a-zA-Z_][a-zA-Z0-9_]*(?!\.)', Name.Function , '#pop') ], 'annotations' : [ (r"(.*?)\]", Name.Class, '#pop') @@ -3934,6 +3934,6 @@ class AmbientTalkLexer(RegexLexer): 'arglist' : [ (r'\|', Punctuation, '#pop'), (r'\s*(,)\s*', Punctuation), - (r'\w[\w\d]*', Name.Variable) + (r'[a-zA-Z_][a-zA-Z0-9_]*', Name.Variable) ] } |