31 #include "has_operand.h"
47 std::shared_ptr<Type> m_type;
65 void set_symbol(
Symbol *symbol);
66 void set_type(
const std::shared_ptr<Type> &type);
68 void reset_symbol(
Symbol *symbol) {
73 bool has_symbol()
const;
74 Symbol *get_symbol()
const;
75 std::shared_ptr<Type> get_type()
const;
77 bool is_lvalue()
const;
78 void set_lvalue(
bool lvalue);
80 bool has_literal_value()
const;
81 void set_literal_value(
const LiteralValue &literal_value);
84 void set_strnum(
int strnum) { m_strnum = strnum; }
85 int get_strnum()
const {
return m_strnum; }
HasOperand is a base class for NodeBase, which in turn is a base class for Node.
Definition: has_operand.h:31
Helper class for representing literal values (integer, character, and string).
Definition: literal_value.h:45
The Node class will inherit from this type, so you can use it to define any attributes and methods th...
Definition: node_base.h:43
Support for working with literal values appearing in source code.