Loading...
Searching...
No Matches
defArrayExpr.hpp
Go to the documentation of this file.
1
2#pragma once
3
5#include "core/ast/expr.hpp"
6
7namespace by {
8
18 class _nout defArrayExpr: public expr {
20 friend class coreInternal;
21
22 public:
23 defArrayExpr(const node& type);
24 defArrayExpr(const narr& elems);
25
26 public:
27 using super::eval;
28 str eval(const args& a) override;
29
30 str infer() const override;
36 const baseObj* getArrayType() const;
37 const arr& getOrigin() const;
38 const narr& getElems() const BY_CONST_FUNC(_getElems())
39
40 private:
42 narr& _getElems();
43
44 private:
45 str _type;
46 narr _elems;
47 mutable tstr<arr> _org;
48 };
49}
Function or object evaluation arguments.
Definition args.hpp:22
Scripted array container for byeol language.
Definition arr.hpp:15
Base class for representing byeol objects.
Definition baseObj.hpp:73
Definition coreInternal.hpp:39
Array literal expression.
Definition defArrayExpr.hpp:18
str infer() const override
const baseObj * getArrayType() const
Gets the type of the array elements after type promotion.
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