valLeaf.hpp
Go to the documentation of this file.
1
2#pragma once
3
4#include "leaf/ast/leaf.hpp"
5
6namespace by {
7
12 class _nout valLeaf: public leaf {
13 BY(ME(valLeaf, leaf), CLONE(me), INIT_META(valLeaf))
14
15 public:
16 valLeaf(const std::string& rawVal, const std::string& name = "");
17 valLeaf(nbool val, const std::string& name = "");
18 valLeaf(nint val, const std::string& name = "");
19 valLeaf(nflt val, const std::string& name = "");
20 valLeaf(const me& rhs, const std::string& name = "");
21
22 public:
23 const std::string& asStr() const override;
24 nchar asChar() const override;
25 nint asInt() const override;
26 nbool asBool() const override;
27 const type& getType() const override;
28
29 private:
30 static std::string toLower(std::string it);
31
32 private:
33 std::string _rawVal;
34 };
35}
Core AST node for leaf configuration language.
Definition: leaf.hpp:12
Base class for runtime type information in byeol language.
Definition: type.hpp:12
Value leaf node for storing primitive values.
Definition: valLeaf.hpp:12