diff options
| author | Glenn Smith <glenn@vector35.com> | 2022-06-09 17:36:44 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2022-11-11 16:11:47 -0500 |
| commit | 14d91ab76f7bcee588bcbb7e89639adae90c9f62 (patch) | |
| tree | 35715e66dc58015c421f4ada9e76dbf079213594 /binaryninjaapi.h | |
| parent | 772ab3ced92833a271db5ba05cdcfbf83b9f1880 (diff) | |
Extra options for type parsers
Diffstat (limited to 'binaryninjaapi.h')
| -rw-r--r-- | binaryninjaapi.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/binaryninjaapi.h b/binaryninjaapi.h index a6a98da2..efebbfe7 100644 --- a/binaryninjaapi.h +++ b/binaryninjaapi.h @@ -11529,6 +11529,7 @@ namespace BinaryNinja { explicit TypeParser(const std::string& name); TypeParser(BNTypeParser* parser); + static bool GetOptionTextCallback(void* ctxt, BNTypeParserOption option, const char* value, char** result); static bool PreprocessSourceCallback(void* ctxt, const char* source, const char* fileName, BNPlatform* platform, const BNQualifiedNameTypeAndId* existingTypes, size_t existingTypeCount, @@ -11560,6 +11561,15 @@ namespace BinaryNinja { static Ref<TypeParser> GetByName(const std::string& name); static Ref<TypeParser> GetDefault(); + /** + Get the string representation of an option for passing to ParseTypes* + \param option Option type + \param value Option value + \param result String representing the option + \return True if the parser supports the option + */ + virtual bool GetOptionText(BNTypeParserOption option, std::string value, std::string& result) const; + /*! Preprocess a block of source, returning the source that would be parsed \param source Source code to process @@ -11635,6 +11645,8 @@ namespace BinaryNinja { CoreTypeParser(BNTypeParser* parser); virtual ~CoreTypeParser() {} + virtual bool GetOptionText(BNTypeParserOption option, std::string value, std::string& result) const override; + virtual bool PreprocessSource( const std::string& source, const std::string& fileName, |
