Loading...
Searching...
No Matches
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
17 class _nout asExpr: public expr {
19
20 public:
21 asExpr(const node& me, const node& as);
22
23 public:
24 using super::eval;
25 str eval(const args& a) override;
26 str infer() const override;
27 const node& getMe() const;
28 const node& getAs() const;
29
34 void setAs(const node& new1);
35 void setAs(const node* it) BY_SIDE_FUNC(setAs);
36
37 void onCloneDeep(const clonable& from) override;
38
39 private:
40 str _me;
41 str _as;
42 };
43}
Function or object evaluation arguments.
Definition args.hpp:22
Type casting expression.
Definition asExpr.hpp:17
str infer() const override
void setAs(const node &new1)
Sets the target type for the explicit type casting expression.
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
to Top