assignExpr.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "core/ast/expr.hpp"
5#include "core/ast/param.hpp"
6#include "core/ast/scope.hpp"
7
8namespace by {
9
10 class visitor;
11
16 class _nout assignExpr: public expr {
17 BY(CLASS(assignExpr, expr, expr::exprType), VISIT())
18 friend class verifier;
19 friend class func;
20 typedef scope::iter iter;
21
22 public:
23 assignExpr(const node& lhs, const node& rhs);
24
25 public:
26 using super::run;
27 str run(const args& a) override;
28 str getEval() const override;
29 const node& getLeft() const;
30 const node& getRight() const;
31 void onCloneDeep(const clonable& from) override;
32
33 private:
34 iter _getScopeIterOfLhs();
35
36 private:
37 str _lhs; // name of variable or lambda.
38 str _rhs;
39 };
40}
Function call arguments container.
Definition: args.hpp:13
Assignment expression for variable assignment.
Definition: assignExpr.hpp:16
str getEval() const override
Interface for objects that can be cloned.
Definition: clonable.hpp:12
Type information for expression nodes
Definition: expr.hpp:22
Base class for all expressions.
Definition: expr.hpp:15
Function definition in byeol language.
Definition: func.hpp:20
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
AST verifier for semantic analysis.
Definition: verifier.hpp:20
Bidirectional iterator for key-value containers.
Definition: biter.hpp:9