diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-11-18 14:52:58 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-18 14:52:58 -0500 |
| commit | d898d561e3c76ecf38db434ec7fbb4bbd0e25cb2 (patch) | |
| tree | 7d92bcf80430a6d3e065aac9fc06a2c44b1cf5fa /source/slang/slang-parser.h | |
| parent | bdc589b0b1360cd06c48f88a117c55e84198ab23 (diff) | |
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.
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 |
