Executor for Conditional Macros.
bool applyMacro(Node &node) override
Executes macros in the Node if the Executor can handle it.
bool canHandle(Node &node) override
Checks if the executor can apply a macro on the passed Node.
Node evaluate(Node &node, bool is_not_body)
Evaluate only the macros.
bool isTruthy(const Node &node)
Check if a node can be evaluated to true.
void registerMacro(Node &node)
Registers macros based on their type.
A node of an Abstract Syntax Tree for ArkScript.
NodeType nodeType() const noexcept
Return the node type.
void setNodeType(NodeType type) noexcept
Set the Node Type object.
const std::vector< Node > & constList() const noexcept
Return the list of sub-nodes held by the node.
Keyword keyword() const noexcept
Return the keyword held by the value (if the node type allows it)
static const Node & getNilNode()
Provide a statically initialized / correct and guaranteed to be initialized Node representing "Nil".
std::vector< Node > & list() noexcept
Return the list of sub-nodes held by the node.