asExpr.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 asExpr: public expr {
17 BY(CLASS(asExpr, expr, expr::exprType), VISIT())
18 friend class verifier;
19 friend class func;
20
21 public:
22 asExpr(const node& me, const node& as);
23
24 public:
25 using super::run;
26 str run(const args& a) override;
27 str getEval() const override;
28 const node& getMe() const;
29 const node& getAs() const;
30
31 void setAs(const node& new1);
32 void setAs(const node* it) BY_SIDE_FUNC(setAs);
33
34 void onCloneDeep(const clonable& from) override;
35
36 private:
37 str _me;
38 str _as;
39 };
40}
Function call arguments container.
Definition: args.hpp:13
Type casting expression.
Definition: asExpr.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