From cab694dcead92a554654d7fa3f08909d519425f0 Mon Sep 17 00:00:00 2001 From: Tim Foley Date: Thu, 29 Jun 2017 08:55:09 -0700 Subject: Add meta-definitions for AST types - The big change here is that all the definitions for syntax-node classes have been macro-ized, to that we can do light metaprogramming over them - The use of macros for this has big down-sides, but I'm not quite ready to do anything more heavy-weight right now - The macro-ized definitions can be included multiple times, to generate different declarations/code as needed - The first example of using this meta-programming facility is a new visitor system - The actual visitor base classes and the dispatch logic are all generated from the meta-files - There was only one visitor left in the code: the semantics checker, so that was ported to the new system. - All current test cases pass, so *of course* that means all is well. --- source/slang/syntax-visitors.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/slang/syntax-visitors.h') diff --git a/source/slang/syntax-visitors.h b/source/slang/syntax-visitors.h index 5d712b671..85a20a7cf 100644 --- a/source/slang/syntax-visitors.h +++ b/source/slang/syntax-visitors.h @@ -11,11 +11,10 @@ namespace Slang class ShaderCompiler; class ShaderLinkInfo; class ShaderSymbol; + class TranslationUnitRequest; - SyntaxVisitor* CreateSemanticsVisitor( - DiagnosticSink* err, - CompileRequest* request, + void checkTranslationUnit( TranslationUnitRequest* translationUnit); // Look for a module that matches the given name: -- cgit v1.2.3