9#ifndef LLDB_VALUEOBJECT_DILPARSER_H
10#define LLDB_VALUEOBJECT_DILPARSER_H
17#include "llvm/Support/Error.h"
21#include <system_error>
43 :
public llvm::ErrorInfo<DILDiagnosticError, DiagnosticError> {
49 : ErrorInfo(make_error_code(std::errc::invalid_argument)),
53 uint32_t loc, uint16_t err_len = 1);
55 std::unique_ptr<CloneableError>
Clone()
const override {
56 return std::make_unique<DILDiagnosticError>(
m_detail);
59 llvm::ArrayRef<DiagnosticDetail>
GetDetails()
const override {
70 static llvm::Expected<ASTNodeUP>
110 const std::vector<Token> &ptr_operators);
112 void BailOut(
const std::string &
error, uint32_t loc, uint16_t err_len);
116 void ExpectOneOf(std::vector<Token::Kind> kinds_vec);
120 llvm::consumeError(std::move(
m_error));
static llvm::raw_ostream & error(Stream &strm)
Generic representation of a type in a programming language.
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
This base class provides an interface to stack frames.
DILDiagnosticError(DiagnosticDetail detail)
std::unique_ptr< CloneableError > Clone() const override
llvm::ArrayRef< DiagnosticDetail > GetDetails() const override
std::string message() const override
DiagnosticDetail m_detail
Class for doing the simple lexing required by DIL.
ASTNodeUP ParseAdditiveExpression()
ASTNodeUP ParseUnaryExpression()
void ParseTypeSpecifierSeq(std::string &type_name)
ASTNodeUP ParseIntegerLiteral()
void Expect(Token::Kind kind)
std::optional< CompilerType > ParseTypeId()
static llvm::Expected< ASTNodeUP > Parse(llvm::StringRef dil_input_expr, DILLexer lexer, StackFrame &stack_frame, lldb::DynamicValueType use_dynamic, lldb::DILMode mode)
void TentativeParsingRollback(uint32_t saved_idx)
ASTNodeUP ParseFloatingPointLiteral()
ASTNodeUP ParseExpression()
void ExpectOneOf(std::vector< Token::Kind > kinds_vec)
std::optional< std::string > ParseTypeSpecifier()
ASTNodeUP ParseNumericLiteral()
ASTNodeUP ParseAssignmentExpression()
std::optional< CompilerType > ParseBuiltinType()
ASTNodeUP ParsePrimaryExpression()
DILParser(llvm::StringRef dil_input_expr, DILLexer lexer, StackFrame &stack_frame, lldb::DynamicValueType use_dynamic, llvm::Error &error, lldb::DILMode mode)
void BailOut(const std::string &error, uint32_t loc, uint16_t err_len)
CompilerType ResolveTypeDeclarators(CompilerType type, const std::vector< Token > &ptr_operators)
ASTNodeUP ParsePostfixExpression()
std::string ParseIdExpression()
ASTNodeUP ParseMultiplicativeExpression()
lldb::DynamicValueType m_use_dynamic
std::string ParseUnqualifiedId()
ASTNodeUP ParseCastExpression()
ASTNodeUP ParseBooleanLiteral()
std::optional< std::string > ParseTypeName()
llvm::StringRef m_input_expr
std::string ParseNestedNameSpecifier()
ASTNodeUP ParseShiftExpression()
StackFrame & m_stack_frame
Class defining the tokens generated by the DIL lexer and used by the DIL parser.
std::unique_ptr< ASTNode > ASTNodeUP
CompilerType ResolveTypeByName(const std::string &name, ExecutionContextScope &ctx_scope)
@ kInvalidExpressionSyntax
A class that represents a running process on the host machine.
DILMode
Data Inspection Language (DIL) evaluation modes.
A compiler-independent representation of an lldb_private::Diagnostic.