summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 24b0dd717..20b9856c5 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -2121,6 +2121,17 @@ struct EmitVisitor
}
}
+ void EmitUnparsedStmt(RefPtr<UnparsedStmt> stmt)
+ {
+ // TODO: actually emit the tokens that made up the statement...
+ Emit("{\n");
+ for( auto& token : stmt->tokens )
+ {
+ emitTokenWithLocation(token);
+ }
+ Emit("}\n");
+ }
+
void EmitStmt(RefPtr<StatementSyntaxNode> stmt)
{
// Try to ensure that debugging can find the right location
@@ -2139,6 +2150,11 @@ struct EmitVisitor
}
return;
}
+ else if( auto unparsedStmt = stmt.As<UnparsedStmt>() )
+ {
+ EmitUnparsedStmt(unparsedStmt);
+ return;
+ }
else if (auto exprStmt = stmt.As<ExpressionStatementSyntaxNode>())
{
EmitExpr(exprStmt->Expression);