diff options
author | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-15 20:50:25 -0400 |
---|---|---|
committer | Gaurav Jain <gaurav@gauravjain.org> | 2014-05-15 20:50:25 -0400 |
commit | 4eb6e4dd67d57197d3a077cf4aeca6736ef85d5b (patch) | |
tree | 4be64c9c482ab43bb16c26cbd7a49f1a6af9fff8 /pygments | |
parent | f8a5949ecb6e4865aad9c2511d14b5a9ee87bdc6 (diff) | |
download | pygments-4eb6e4dd67d57197d3a077cf4aeca6736ef85d5b.tar.gz |
Superfluous character class when only one char
Diffstat (limited to 'pygments')
-rw-r--r-- | pygments/lexers/compiled.py | 2 | ||||
-rw-r--r-- | pygments/lexers/functional.py | 2 | ||||
-rw-r--r-- | pygments/lexers/other.py | 6 | ||||
-rw-r--r-- | pygments/lexers/parsers.py | 4 | ||||
-rw-r--r-- | pygments/lexers/templates.py | 2 | ||||
-rw-r--r-- | pygments/lexers/web.py | 2 |
6 files changed, 9 insertions, 9 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py index 913de08b..c41cd3df 100644 --- a/pygments/lexers/compiled.py +++ b/pygments/lexers/compiled.py @@ -2766,7 +2766,7 @@ class BlitzMaxLexer(RegexLexer): bmax_lktypes = r'\b(Int|Byte|Short|Float|Double|Long)\b' bmax_name = r'[a-z_][a-z0-9_]*' bmax_var = (r'(%s)(?:(?:([ \t]*)(%s)|([ \t]*:[ \t]*\b(?:Shl|Shr|Sar|Mod)\b)' - r'|([ \t]*)([:])([ \t]*)(?:%s|(%s)))(?:([ \t]*)(Ptr))?)') % \ + r'|([ \t]*)(:)([ \t]*)(?:%s|(%s)))(?:([ \t]*)(Ptr))?)') % \ (bmax_name, bmax_sktypes, bmax_lktypes, bmax_name) bmax_func = bmax_var + r'?((?:[ \t]|\.\.\n)*)([(])' diff --git a/pygments/lexers/functional.py b/pygments/lexers/functional.py index 72fb37bc..1f9d816e 100644 --- a/pygments/lexers/functional.py +++ b/pygments/lexers/functional.py @@ -1163,7 +1163,7 @@ class AgdaLexer(RegexLexer): (r'\b(Set|Prop)\b', Keyword.Type), # Special Symbols (r'(\(|\)|\{|\})', Operator), - (u'(\\.{1,3}|\\||[\u039B]|[\u2200]|[\u2192]|:|=|->)', Operator.Word), + (u'(\\.{1,3}|\\||\u039B|\u2200|\u2192|:|=|->)', Operator.Word), # Numbers (r'\d+[eE][+-]?\d+', Number.Float), (r'\d+\.\d+([eE][+-]?\d+)?', Number.Float), diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index cef71f95..5bb60560 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -1306,9 +1306,9 @@ class ModelicaLexer(RegexLexer): (r'\d+[Ll]?', Number.Integer), (r'[~!%^&*+=|?:<>/-]', Operator), (r'(true|false|NULL|Real|Integer|Boolean)\b', Name.Builtin), - (r'([a-zA-Z_][\w]*|[\'][^\']+[\'])' + (r'([a-zA-Z_][\w]*|\'[^\']+\')' r'([\[\d,:\]]*)' - r'(\.([a-zA-Z_][\w]*|[\'][^\']+[\']))+' + r'(\.([a-zA-Z_][\w]*|\'[^\']+\'))+' r'([\[\d,:\]]*)', Name.Class), (r'(\'[\w\+\-\*\/\^]+\'|\w+)', Name), (r'[()\[\]{},.;]', Punctuation), @@ -1350,7 +1350,7 @@ class ModelicaLexer(RegexLexer): 'classes': [ (r'(operator)?(\s+)?(block|class|connector|end|function|model|' r'operator|package|record|type)(\s+)' - r'((?!if|for|when|while)[A-Za-z_]\w*|[\'][^\']+[\'])([;]?)', + r'((?!if|for|when|while)[A-Za-z_]\w*|\'[^\']+\')([;]?)', bygroups(Keyword, Text, Keyword, Text, Name.Class, Text)) ], 'quoted_ident': [ diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py index fc8cbb6f..4c23c760 100644 --- a/pygments/lexers/parsers.py +++ b/pygments/lexers/parsers.py @@ -102,7 +102,7 @@ class RagelLexer(RegexLexer): 'host': [ (r'(' + r'|'.join(( # keep host code in largest possible chunks r'[^{}\'"/#]+', # exclude unsafe characters - r'[^\\][\\][{}]', # allow escaped { or } + r'[^\\]\\[{}]', # allow escaped { or } # strings and comments may safely contain unsafe characters r'"(\\\\|\\"|[^"])*"', # double quote string @@ -173,7 +173,7 @@ class RagelEmbeddedLexer(RegexLexer): r'[^}\'"\[/#]', # exclude unsafe characters r'}(?=[^%]|$)', # } is okay as long as it's not followed by % r'}%(?=[^%]|$)', # ...well, one %'s okay, just not two... - r'[^\\][\\][{}]', # ...and } is okay if it's escaped + r'[^\\]\\[{}]', # ...and } is okay if it's escaped # allow / if it's preceded with one of these symbols # (ragel EOF actions) diff --git a/pygments/lexers/templates.py b/pygments/lexers/templates.py index 62d5da85..25f53585 100644 --- a/pygments/lexers/templates.py +++ b/pygments/lexers/templates.py @@ -753,7 +753,7 @@ class CheetahLexer(RegexLexer): (r'''(?sx) (.+?) # anything, followed by: (?: - (?=[#][#a-zA-Z]*) | # an eval comment + (?=\#[#a-zA-Z]*) | # an eval comment (?=\$[a-zA-Z_{]) | # a substitution \Z # end of string ) diff --git a/pygments/lexers/web.py b/pygments/lexers/web.py index ab8a6bcc..3a831b06 100644 --- a/pygments/lexers/web.py +++ b/pygments/lexers/web.py @@ -4352,7 +4352,7 @@ class MaskLexer(RegexLexer): ], 'css-base': [ (r'\s+', Text), - (r"[;]", Punctuation), + (r";", Punctuation), (r"[\w\-_]+\s*:", Name.Builtin) ], 'css-single-end': [ |