summaryrefslogtreecommitdiff
path: root/source/slang/slang-check.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check.cpp')
-rw-r--r--source/slang/slang-check.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/slang/slang-check.cpp b/source/slang/slang-check.cpp
index 56e7bd379..633dec215 100644
--- a/source/slang/slang-check.cpp
+++ b/source/slang/slang-check.cpp
@@ -170,7 +170,7 @@ namespace Slang
translationUnit->compileRequest->getSink(),
&loadedModules);
- SemanticsDeclVisitorBase visitor(&sharedSemanticsContext);
+ SemanticsDeclVisitorBase visitor( (SemanticsContext(&sharedSemanticsContext)) );
// Apply the visitor to do the main semantic
// checking that is required on all declarations
@@ -181,9 +181,9 @@ namespace Slang
translationUnit->getModule()->_collectShaderParams();
}
- void SemanticsVisitor::dispatchStmt(Stmt* stmt, FunctionDeclBase* parentFunc, OuterStmtInfo* outerStmts)
+ void SemanticsVisitor::dispatchStmt(Stmt* stmt, SemanticsContext const& context)
{
- SemanticsStmtVisitor visitor(getShared(), parentFunc, outerStmts);
+ SemanticsStmtVisitor visitor(context);
try
{
visitor.dispatch(stmt);
@@ -196,12 +196,12 @@ namespace Slang
}
}
- void SemanticsVisitor::dispatchExpr(Expr* expr)
+ Expr* SemanticsVisitor::dispatchExpr(Expr* expr, SemanticsContext const& context)
{
- SemanticsExprVisitor visitor(getShared());
+ SemanticsExprVisitor visitor(context);
try
{
- visitor.dispatch(expr);
+ return visitor.dispatch(expr);
}
catch(const AbortCompilationException&) { throw; }
catch(...)