summaryrefslogtreecommitdiff
path: root/source/slang/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/parser.cpp')
-rw-r--r--source/slang/parser.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/slang/parser.cpp b/source/slang/parser.cpp
index eb02d98c5..42c763099 100644
--- a/source/slang/parser.cpp
+++ b/source/slang/parser.cpp
@@ -2973,6 +2973,12 @@ namespace Slang
}
PopScope();
+ if(!body)
+ {
+ body = new EmptyStmt();
+ body->loc = blockStatement->loc;
+ }
+
blockStatement->body = body;
return blockStatement;
}