9#ifndef LLDB_VALUEOBJECT_DILAST_H
10#define LLDB_VALUEOBJECT_DILAST_H
13#include "llvm/Support/Error.h"
69 virtual llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const = 0;
84 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
96 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
115 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
137 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
157 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
179 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
205 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
229 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
246 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
265 llvm::Expected<lldb::ValueObjectSP>
Accept(
Visitor *v)
const override;
288 virtual llvm::Expected<lldb::ValueObjectSP>
290 virtual llvm::Expected<lldb::ValueObjectSP>
292 virtual llvm::Expected<lldb::ValueObjectSP>
294 virtual llvm::Expected<lldb::ValueObjectSP>
296 virtual llvm::Expected<lldb::ValueObjectSP>
298 virtual llvm::Expected<lldb::ValueObjectSP>
300 virtual llvm::Expected<lldb::ValueObjectSP>
302 virtual llvm::Expected<lldb::ValueObjectSP>
304 virtual llvm::Expected<lldb::ValueObjectSP>
Visit(
const CastNode &node) = 0;
Generic representation of a type in a programming language.
uint32_t GetLocation() const
ASTNode(uint32_t location, NodeKind kind)
virtual ~ASTNode()=default
virtual llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const =0
ArraySubscriptNode(uint32_t location, ASTNodeUP base, ASTNodeUP index)
ASTNode & GetBase() const
static bool classof(const ASTNode &node)
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
ASTNode & GetIndex() const
static bool classof(const ASTNode &node)
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
BooleanLiteralNode(uint32_t location, bool value)
ASTNode & GetOperand() const
CompilerType GetType() const
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
static bool classof(const ASTNode &node)
CastKind GetCastKind() const
CastNode(uint32_t location, CompilerType type, ASTNodeUP operand, CastKind kind)
static bool classof(const ASTNode &node)
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
static bool classof(const ASTNode &node)
const llvm::APFloat & GetValue() const
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
FloatLiteralNode(uint32_t location, llvm::APFloat value)
IdentifierNode(uint32_t location, std::string name)
std::string GetName() const
static bool classof(const ASTNode &node)
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
IntegerLiteralNode(uint32_t location, llvm::APInt value, uint32_t radix, bool is_unsigned, IntegerTypeSuffix type)
uint32_t GetRadix() const
IntegerTypeSuffix GetTypeSuffix() const
static bool classof(const ASTNode &node)
const llvm::APInt & GetValue() const
MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, std::string name)
static bool classof(const ASTNode &node)
llvm::StringRef GetFieldName() const
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
ASTNode & GetBase() const
UnaryOpNode(uint32_t location, UnaryOpKind kind, ASTNodeUP operand)
llvm::Expected< lldb::ValueObjectSP > Accept(Visitor *v) const override
static bool classof(const ASTNode &node)
UnaryOpKind GetKind() const
ASTNode & GetOperand() const
This class contains one Visit method for each specialized type of DIL AST node.
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const MemberOfNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const IntegerLiteralNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const IdentifierNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const CastNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const FloatLiteralNode &node)=0
virtual ~Visitor()=default
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const BitFieldExtractionNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const BooleanLiteralNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const ArraySubscriptNode &node)=0
virtual llvm::Expected< lldb::ValueObjectSP > Visit(const UnaryOpNode &node)=0
CastKind
The type casts allowed by DIL.
@ eEnumeration
Casting from a scalar to an enumeration type.
@ ePointer
Casting to a pointer type.
@ eNone
Invalid promotion type (results in error).
@ eArithmetic
Casting to a scalar.
UnaryOpKind
The Unary operators recognized by DIL.
std::unique_ptr< ASTNode > ASTNodeUP
NodeKind
The various types DIL AST nodes (used by the DIL parser).