GSC Interpreter
A Turing-complete interpreter developed for a compiler course
|
Class representing an assignment expression. More...
#include <expr.hpp>
Public Member Functions | |
Assign (Token name, std::shared_ptr< Expr > value) | |
std::any | accept (ExprVisitor &visitor) override |
Token | getName () const |
std::shared_ptr< Expr > | getValue () const |
Private Attributes | |
const Token | name |
const std::shared_ptr< Expr > | value |
Class representing an assignment expression.
This class represents an assignment expression in the AST, which consists of a variable name and a value to assign to it. It inherits from the Expr class and implements the accept method for visitor pattern.
|
inlineoverridevirtual |
|
inline |