summaryrefslogtreecommitdiff
path: root/pygments
diff options
context:
space:
mode:
authoralfonse <devnull@localhost>2017-10-29 11:12:59 -0400
committeralfonse <devnull@localhost>2017-10-29 11:12:59 -0400
commitda6ec9620f8af6c9c8886e8b87245159ead6f99a (patch)
treeced5462c49730bf84e6c3420ef28307dfc99e01d /pygments
parent8c72421a642bcc5b3d1723a326cd827a92893ff9 (diff)
downloadpygments-da6ec9620f8af6c9c8886e8b87245159ead6f99a.tar.gz
GLSL: Names that start with `gl_` are properly recognized as built-in variables.
Diffstat (limited to 'pygments')
-rw-r--r--pygments/lexers/graphics.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/pygments/lexers/graphics.py b/pygments/lexers/graphics.py
index 468f740c..c7aa7df4 100644
--- a/pygments/lexers/graphics.py
+++ b/pygments/lexers/graphics.py
@@ -140,6 +140,8 @@ class GLShaderLexer(RegexLexer):
'namespace', 'using'),
prefix=r'\b', suffix=r'\b'),
Keyword.Reserved),
+ # All names beginning with "gl_" are reserved.
+ (r'gl_\w*', Name.Builtin),
(r'[a-zA-Z_]\w*', Name),
(r'\.', Punctuation),
(r'\s+', Text),