Skip to content

Commit

Permalink
Fix GLSL and HLSL preprocessor line continuation
Browse files Browse the repository at this point in the history
  • Loading branch information
bitsawer committed Feb 22, 2023
1 parent b4e9027 commit 552ad3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pygments/lexers/graphics.py
Expand Up @@ -30,7 +30,7 @@ class GLShaderLexer(RegexLexer):

tokens = {
'root': [
(r'^#.*$', Comment.Preproc),
(r'^#(?:.*\\\r?\n)*.*$', Comment.Preproc),
(r'//.*$', Comment.Single),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
(r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?',
Expand Down Expand Up @@ -161,7 +161,7 @@ class HLSLShaderLexer(RegexLexer):

tokens = {
'root': [
(r'^#.*$', Comment.Preproc),
(r'^#(?:.*\\\r?\n)*.*$', Comment.Preproc),
(r'//.*$', Comment.Single),
(r'/(\\\n)?[*](.|\n)*?[*](\\\n)?/', Comment.Multiline),
(r'\+|-|~|!=?|\*|/|%|<<|>>|<=?|>=?|==?|&&?|\^|\|\|?',
Expand Down

0 comments on commit 552ad3f

Please sign in to comment.