ArkScript
A small, fast, functional and scripting language for video games
ValTableElem.cpp
Go to the documentation of this file.
2
3namespace Ark::internal
4{
5 ValTableElem::ValTableElem(const Node& node) noexcept
6 {
7 if (node.nodeType() == NodeType::Number)
8 {
9 value = node.number();
11 }
12 else if (node.nodeType() == NodeType::String)
13 {
14 value = node.string();
16 }
17 }
18
19 ValTableElem::ValTableElem(std::size_t page) noexcept :
20 value(page),
22 {}
23
24 bool ValTableElem::operator==(const ValTableElem& A) const noexcept
25 {
26 return A.value == value && A.type == type;
27 }
28}
The basic value type handled by the compiler.
A node of an Abstract Syntax Tree for ArkScript.
Definition Node.hpp:31
A Compiler Value class helper to handle multiple types.
bool operator==(const ValTableElem &A) const noexcept
ValTableElem(const Node &node) noexcept