From d898d561e3c76ecf38db434ec7fbb4bbd0e25cb2 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 18 Nov 2020 14:52:58 -0500 Subject: Serialized stdlib working (#1603) * #include an absolute path didn't work - because paths were taken to always be relative. * Mangling/module name extraction for GenericDecl * Add comment on SerialFilter to explain re-enabling Stmt. * Support setting up SyntaxDecl when reconstructed after deserialization. * Improvements to setup SyntaxDecl. * Fix typo so can read compressed SourceLocs. * Fix issue with SourceManger. --- source/slang/slang-parser.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/slang/slang-parser.h') diff --git a/source/slang/slang-parser.h b/source/slang/slang-parser.h index bcc0fb6e9..a1077d4a7 100644 --- a/source/slang/slang-parser.h +++ b/source/slang/slang-parser.h @@ -26,6 +26,23 @@ namespace Slang ModuleDecl* populateBaseLanguageModule( ASTBuilder* astBuilder, RefPtr scope); + + /// Information used to set up SyntaxDecl. Such decls + /// when correctly setup define a callback. For some of the callbacks it's necessary + /// for the `parseUserData` to be set the the associated classInfo + struct SyntaxParseInfo + { + const char* keywordName; ///< The keyword associated with this parse + SyntaxParseCallback callback; ///< The callback to apply to the parse + const ReflectClassInfo* classInfo; ///< + }; + + /// Get all of the predefined SyntaxParseInfos + ConstArrayView getSyntaxParseInfos(); + + /// Assumes the userInfo is the ReflectClassInfo + NodeBase* parseSimpleSyntax(Parser* parser, void* userData); + } #endif -- cgit v1.2.3