ArkScript
A small, fast, functional and scripting language for video games
Processor.cpp File Reference
+ Include dependency graph for Processor.cpp:

Go to the source code of this file.

Namespaces

 Ark
 
 Ark::internal
 

Macros

#define GEN_NOT_BODY(str_name, error_handler, ret)
 
#define GEN_COMPARATOR(str_name, cond)
 
#define GEN_OP(str_name, op)
 

Macro Definition Documentation

◆ GEN_COMPARATOR

#define GEN_COMPARATOR (   str_name,
  cond 
)
Value:
str_name, \
throwMacroProcessingError("Interpreting a `" str_name "' condition with " + \
std::to_string(node.list().size() - 1) + " arguments, instead of 2.", \
node), \
(cond) ? Node::getTrueNode() : Node::getFalseNode())
#define GEN_NOT_BODY(str_name, error_handler, ret)

◆ GEN_NOT_BODY

#define GEN_NOT_BODY (   str_name,
  error_handler,
  ret 
)
Value:
else if (name == str_name && is_not_body) \
{ \
if (node.list().size() != 3) error_handler; \
Node one = evaluate(node.list()[1], is_not_body), \
two = evaluate(node.list()[2], is_not_body); \
return ret; \
}

◆ GEN_OP

#define GEN_OP (   str_name,
  op 
)
Value:
str_name, \
throwMacroProcessingError("Interpreting a `" str_name "' operation with " + \
std::to_string(node.list().size() - 1) + " arguments, instead of 2.", \
node), \
(one.nodeType() == two.nodeType() && two.nodeType() == NodeType::Number) ? Node(one.number() op two.number()) : node)