diff options
author | Georg Brandl <georg@python.org> | 2014-11-06 11:59:24 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-11-06 11:59:24 +0100 |
commit | 8b85d2a63069f341498a5feeb1874c11641b8dbc (patch) | |
tree | 1c14a9390d37dd4c5e9dc59378ae9eff0c46cc84 /pygments/lexers/fantom.py | |
parent | 524651a7519eed6216158762a0e627dc7b8bac15 (diff) | |
download | pygments-8b85d2a63069f341498a5feeb1874c11641b8dbc.tar.gz |
Simplify charclasses in a few modules
Diffstat (limited to 'pygments/lexers/fantom.py')
-rw-r--r-- | pygments/lexers/fantom.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/fantom.py b/pygments/lexers/fantom.py index 25a9e027..953b324c 100644 --- a/pygments/lexers/fantom.py +++ b/pygments/lexers/fantom.py @@ -39,7 +39,7 @@ class FantomLexer(RegexLexer): id=r'[a-zA-Z_]\w*', # all chars which can be part of type definition. Starts with # either letter, or [ (maps), or | (funcs) - type=r'(?:\[|[a-zA-Z_]|\|)[:\w\[\]\|\->\?]*?', + type=r'(?:\[|[a-zA-Z_]|\|)[:\w\[\]|\->?]*?', ) ) @@ -118,7 +118,7 @@ class FantomLexer(RegexLexer): (r'\+\+|\-\-|\+|\-|\*|/|\|\||&&|<=>|<=|<|>=|>|=|!|\[|\]', Operator) ], 'inType': [ - (r'[\[\]\|\->:\?]', Punctuation), + (r'[\[\]|\->:?]', Punctuation), (s(r'$id'), Name.Class), default('#pop'), @@ -221,7 +221,7 @@ class FantomLexer(RegexLexer): (r'[ \t]+', Text), # consume whitespaces (r'(\[)(\w+)(\])', bygroups(Punctuation, Comment.Special, Punctuation)), # ffi - (r'(\")?([\w\.]+)(\")?', + (r'(\")?([\w.]+)(\")?', bygroups(Punctuation, Name.Namespace, Punctuation)), # podname (r'::', Punctuation, 'usingClass'), default('#pop') @@ -230,7 +230,7 @@ class FantomLexer(RegexLexer): (r'[ \t]+', Text), # consume whitespaces (r'(as)(\s+)(\w+)', bygroups(Keyword.Declaration, Text, Name.Class), '#pop:2'), - (r'[\w\$]+', Name.Class), + (r'[\w$]+', Name.Class), default('#pop:2') # jump out to root state ], 'facet': [ |