diff options
Diffstat (limited to 'source/slang/visitor.h')
| -rw-r--r-- | source/slang/visitor.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/visitor.h b/source/slang/visitor.h index 59c5772f2..8a0301782 100644 --- a/source/slang/visitor.h +++ b/source/slang/visitor.h @@ -34,6 +34,13 @@ struct TypeVisitor : Base return result; } + Result dispatchType(Type* type) + { + Result result; + type->accept(this, &result); + return result; + } + #define ABSTRACT_SYNTAX_CLASS(NAME,BASE) /* empty */ #define SYNTAX_CLASS(NAME, BASE) \ virtual void dispatch_##NAME(NAME* obj, void* extra) override \ @@ -61,6 +68,11 @@ struct TypeVisitor<Derived,void,Base> : Base type->accept(this, 0); } + void dispatchType(Type* type) + { + type->accept(this, 0); + } + #define ABSTRACT_SYNTAX_CLASS(NAME,BASE) /* empty */ #define SYNTAX_CLASS(NAME, BASE) \ virtual void dispatch_##NAME(NAME* obj, void*) override \ |
