summaryrefslogtreecommitdiffstats
path: root/source/slang/slang-parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-parser.cpp')
-rw-r--r--source/slang/slang-parser.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/source/slang/slang-parser.cpp b/source/slang/slang-parser.cpp
index 8fb3be39c..172e3130f 100644
--- a/source/slang/slang-parser.cpp
+++ b/source/slang/slang-parser.cpp
@@ -5783,6 +5783,27 @@ DeclStmt* Parser::parseVarDeclrStatement(Modifiers modifiers)
FillPosition(varDeclrStatement);
auto decl = ParseDeclWithModifiers(this, currentScope->containerDecl, modifiers);
varDeclrStatement->decl = decl;
+
+ if (as<VarDeclBase>(decl))
+ {
+ }
+ else if (as<DeclGroup>(decl))
+ {
+ }
+ else if (as<AggTypeDecl>(decl))
+ {
+ }
+ else if (as<TypeDefDecl>(decl))
+ {
+ }
+ else if (as<UsingDecl>(decl))
+ {
+ }
+ else
+ {
+ sink->diagnose(decl->loc, Diagnostics::declNotAllowed, decl->astNodeType);
+ }
+
return varDeclrStatement;
}