diff options
author | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-18 04:17:32 -0400 |
---|---|---|
committer | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-18 04:17:32 -0400 |
commit | 99fba293818c780ce48e990e973c9df24ec6c8c0 (patch) | |
tree | 8d57b06c7921469563dbbb2e3279d3fda900c47a /pygments/lexers/dotnet.py | |
parent | d3399178e86e83c3ffa8d0b188d0478d12c90431 (diff) | |
download | pygments-99fba293818c780ce48e990e973c9df24ec6c8c0.tar.gz |
Apply default state transition in various lexers to avoid extra token generation
Diffstat (limited to 'pygments/lexers/dotnet.py')
-rw-r--r-- | pygments/lexers/dotnet.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/dotnet.py b/pygments/lexers/dotnet.py index 5a07cd0d..a490314b 100644 --- a/pygments/lexers/dotnet.py +++ b/pygments/lexers/dotnet.py @@ -11,7 +11,7 @@ import re from pygments.lexer import RegexLexer, DelegatingLexer, bygroups, include, \ - using, this + using, this, default from pygments.token import Punctuation, \ Text, Comment, Operator, Keyword, Name, String, Number, Literal, Other from pygments.util import get_choice_opt, iteritems @@ -440,7 +440,7 @@ class VbNetLexer(RegexLexer): ], 'dim': [ (r'[a-z_]\w*', Name.Variable, '#pop'), - (r'', Text, '#pop'), # any other syntax + default('#pop'), # any other syntax ], 'funcname': [ (r'[a-z_]\w*', Name.Function, '#pop'), @@ -455,7 +455,7 @@ class VbNetLexer(RegexLexer): (r'\s+', Text), (r'(Function|Sub|Property|Class|Structure|Enum|Module|Namespace)\b', Keyword, '#pop'), - (r'', Text, '#pop'), + default('#pop'), ] } @@ -645,7 +645,7 @@ class FSharpLexer(RegexLexer): (r'[A-Z][\w\']*', Name, '#pop'), (r'[a-z_][\w\']*', Name, '#pop'), # e.g. dictionary index access - (r'', Text, '#pop'), + default('#pop'), ], 'comment': [ (r'[^(*)@"]+', Comment), |