Loading...
Searching...
No Matches
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
19 class _nout assignExpr: public expr {
21 typedef scope::iter iter;
22
23 public:
24 assignExpr(const node& lhs, const node& rhs);
25
26 public:
27 using super::eval;
28 str eval(const args& a) override;
29 str infer() const override;
30 const node& getLeft() const;
31 const node& getRight() const;
32 void onCloneDeep(const clonable& from) override;
33
34 private:
35 iter _getScopeIterOfLhs();
36
37 private:
38 str _lhs; // name of variable or lambda.
39 str _rhs;
40 };
41}
Function or object evaluation arguments.
Definition args.hpp:22
Assignment expression.
Definition assignExpr.hpp:19
str infer() const override
Type information for expression nodes
Definition expr.hpp:45
Base class for all expressions.
Definition expr.hpp:36
Base class for all AST nodes in the byeol language.
Definition node.hpp:195
Definition tnarr.hpp:9
Bidirectional iterator for key-value containers.
Definition biter.hpp:10
to Top