summaryrefslogtreecommitdiffstats
path: root/source/slang/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/parser.cpp')
-rw-r--r--source/slang/parser.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp
index 50205ff29..a624c58c5 100644
--- a/source/slang/parser.cpp
+++ b/source/slang/parser.cpp
@@ -729,6 +729,19 @@ namespace Slang
AddModifier(&modifierLink, modifier);
}
+ else if (AdvanceIf(parser, "__glsl_version"))
+ {
+ auto modifier = new RequiredGLSLVersionModifier();
+ modifier->Position = loc;
+
+ parser->ReadToken(TokenType::LParent);
+ modifier->versionNumberToken = parser->ReadToken(TokenType::IntegerLiteral);
+ parser->ReadToken(TokenType::RParent);
+
+ AddModifier(&modifierLink, modifier);
+ }
+
+
else if (AdvanceIf(parser, "layout"))
{
parser->ReadToken(TokenType::LParent);