diff options
Diffstat (limited to 'source/slang/slang-parser.h')
| -rw-r--r-- | source/slang/slang-parser.h | 17 |
1 files changed, 17 insertions, 0 deletions
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> 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<SyntaxParseInfo> getSyntaxParseInfos(); + + /// Assumes the userInfo is the ReflectClassInfo + NodeBase* parseSimpleSyntax(Parser* parser, void* userData); + } #endif |
