defArrayExpr.hpp
Go to the documentation of this file.
1
2#pragma once
3
5#include "core/ast/expr.hpp"
6
7namespace by {
8
13 class _nout defArrayExpr: public expr {
14 BY(CLASS(defArrayExpr, expr, expr::exprType), VISIT())
15 friend class visitor; // for getElems()
16
17 public:
18 defArrayExpr(const node& type);
19 defArrayExpr(const narr& elems);
20
21 public:
22 using super::run;
23 str run(const args& a) override;
24
25 str getEval() const override;
26 const baseObj* getArrayType() const;
27 const arr& getOrigin() const;
28 const narr& getElems() const BY_CONST_FUNC(getElems())
29
30 private:
31 tstr<baseObj> _deduceElems() const;
32 narr& getElems();
33
34 private:
35 str _type;
36 narr _elems;
37 mutable tstr<arr> _org;
38 };
39}
Function call arguments container.
Definition: args.hpp:13
Managed array container for byeol language.
Definition: arr.hpp:14
Base class for all objects in byeol language.
Definition: baseObj.hpp:24
arr definition expression
Definition: defArrayExpr.hpp:13
str getEval() const override
Type information for expression nodes
Definition: expr.hpp:22
Base class for all expressions.
Definition: expr.hpp:15
Base class for all AST nodes in byeol language.
Definition: node.hpp:30
Base class for runtime type information in byeol language.
Definition: type.hpp:12
Base visitor class for AST traversal.
Definition: visitor.hpp:20