diff options
author | Georg Brandl <georg@python.org> | 2014-11-06 13:36:41 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-11-06 13:36:41 +0100 |
commit | 90fe03b0f663810f4b6718d89b5e830ec2c67960 (patch) | |
tree | d5b69099b513da0db10404445613a226a11c46eb /pygments/lexers/graphics.py | |
parent | 01f13cc2e664ebab1815fbaca35f3815160a8d56 (diff) | |
download | pygments-90fe03b0f663810f4b6718d89b5e830ec2c67960.tar.gz |
Simplify charclasses in a few more modules
Diffstat (limited to 'pygments/lexers/graphics.py')
-rw-r--r-- | pygments/lexers/graphics.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pygments/lexers/graphics.py b/pygments/lexers/graphics.py index 95010046..0b8bf5d8 100644 --- a/pygments/lexers/graphics.py +++ b/pygments/lexers/graphics.py @@ -68,7 +68,7 @@ class GLShaderLexer(RegexLexer): 'sampler2DRectShadow', 'sizeof', 'cast', 'namespace', 'using'), prefix=r'\b', suffix=r'\b'), Keyword), # future use - (r'[a-zA-Z_][a-zA-Z_0-9]*', Name), + (r'[a-zA-Z_]\w*', Name), (r'\.', Punctuation), (r'\s+', Text), ], @@ -90,7 +90,7 @@ class PostScriptLexer(RegexLexer): filenames = ['*.ps', '*.eps'] mimetypes = ['application/postscript'] - delimiter = r'\(\)\<\>\[\]\{\}\/\%\s' + delimiter = r'()<>\[\]{}/%\s' delimiter_end = r'(?=[%s])' % delimiter valid_name_chars = r'[^%s]' % delimiter @@ -160,7 +160,7 @@ class PostScriptLexer(RegexLexer): ], 'stringliteral': [ - (r'[^\(\)\\]+', String), + (r'[^()\\]+', String), (r'\\', String.Escape, 'escape'), (r'\(', String, '#push'), (r'\)', String, '#pop'), @@ -543,7 +543,7 @@ class PovrayLexer(RegexLexer): (r'[\[\](){}<>;,]', Punctuation), (r'[-+*/=]', Operator), (r'\b(x|y|z|u|v)\b', Name.Builtin.Pseudo), - (r'[a-zA-Z_][a-zA-Z_0-9]*', Name), + (r'[a-zA-Z_]\w*', Name), (r'[0-9]+\.[0-9]*', Number.Float), (r'\.[0-9]+', Number.Float), (r'[0-9]+', Number.Integer), |