diff options
Diffstat (limited to 'include/lldb/Expression/ExpressionParser.h')
-rw-r--r-- | include/lldb/Expression/ExpressionParser.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/include/lldb/Expression/ExpressionParser.h b/include/lldb/Expression/ExpressionParser.h index 49333e79bf5e..323e515e3bba 100644 --- a/include/lldb/Expression/ExpressionParser.h +++ b/include/lldb/Expression/ExpressionParser.h @@ -57,17 +57,34 @@ public: /// Parse a single expression and convert it to IR using Clang. Don't /// wrap the expression in anything at all. /// - /// @param[in] stream - /// The stream to print errors to. + /// @param[in] diagnostic_manager + /// The diagnostic manager in which to store the errors and warnings. /// /// @return /// The number of errors encountered during parsing. 0 means /// success. //------------------------------------------------------------------ virtual unsigned - Parse (Stream &stream) = 0; + Parse(DiagnosticManager &diagnostic_manager) = 0; //------------------------------------------------------------------ + /// Try to use the FixIts in the diagnostic_manager to rewrite the + /// expression. If successful, the rewritten expression is stored + /// in the diagnostic_manager, get it out with GetFixedExpression. + /// + /// @param[in] diagnostic_manager + /// The diagnostic manager containing fixit's to apply. + /// + /// @return + /// \b true if the rewrite was successful, \b false otherwise. + //------------------------------------------------------------------ + virtual bool + RewriteExpression(DiagnosticManager &diagnostic_manager) + { + return false; + } + + //------------------------------------------------------------------ /// Ready an already-parsed expression for execution, possibly /// evaluating it statically. /// |