summaryrefslogtreecommitdiff
path: root/binaryninjaapi.h
diff options
context:
space:
mode:
Diffstat (limited to 'binaryninjaapi.h')
-rw-r--r--binaryninjaapi.h12
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,