summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2017-11-05 16:39:38 -0500
committerGitHub <noreply@github.com>2017-11-05 16:39:38 -0500
commit296e89ca4f3d6d99126bf2ee59666bc946add431 (patch)
treebff41e36c9b6843d83a5ca5e83645310be6687f3 /source/slang/emit.cpp
parentc6fb1de9547bd24a693915b758cc35499f1d949f (diff)
parentff7c46a11787ca6ecebf0a224772a41efef33fc0 (diff)
Merge pull request #243 from csyonghe/master
Adding associated types
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index 336d73abe..056454845 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -395,8 +395,7 @@ struct EmitVisitor
void emitRawTextSpan(char const* textBegin, char const* textEnd)
{
// TODO(tfoley): Need to make "corelib" not use `int` for pointer-sized things...
- auto len = int(textEnd - textBegin);
-
+ auto len = textEnd - textBegin;
context->shared->sb.Append(textBegin, len);
}
@@ -1039,7 +1038,6 @@ struct EmitVisitor
UNEXPECTED(PtrType);
#undef UNEXPECTED
-
void visitNamedExpressionType(NamedExpressionType* type, TypeEmitArg const& arg)
{
// Named types are valid for GLSL
@@ -2917,7 +2915,7 @@ struct EmitVisitor
return;
}
- Substitutions* subst = declRef.substitutions.Ptr();
+ GenericSubstitution* subst = declRef.substitutions.As<GenericSubstitution>().Ptr();
if (!subst)
return;
@@ -3009,6 +3007,12 @@ struct EmitVisitor
Emit(";\n");
}
+ void visitAssocTypeDecl(AssocTypeDecl * /*assocType*/, DeclEmitArg const&)
+ {
+ SLANG_UNREACHABLE("visitAssocTypeDecl in EmitVisitor");
+ }
+
+
void visitImportDecl(ImportDecl* decl, DeclEmitArg const&)
{
// When in "rewriter" mode, we need to emit the code of the imported