![]()  | 
  
    ArkScript
    
   A small, lisp-inspired, functional scripting language 
   | 
 
Handles Symbol macros. More...
#include <Symbol.hpp>
Public Member Functions | |
| bool | applyMacro (Node &node, unsigned depth) override | 
| bool | canHandle (Node &node) override | 
| Node | macroNode (Node &node) override | 
| Returns the macro node that will be expanded.   | |
| MacroExecutor (MacroProcessor *processor, unsigned debug=0) | |
| Construct a new Macro Executor object.   | |
  Public Member Functions inherited from Ark::internal::MacroExecutor | |
| MacroExecutor (MacroProcessor *processor, unsigned debug=0) | |
| Construct a new Macro Executor object.   | |
| virtual | ~MacroExecutor ()=default | 
| Need a virtual destructor to correctly destroy object.   | |
Additional Inherited Members | |
  Protected Member Functions inherited from Ark::internal::MacroExecutor | |
| const Node * | findNearestMacro (const std::string &name) const | 
| Find the nearest macro matching a giving name.   | |
| void | applyMacroProxy (Node &node, unsigned depth) | 
| Apply a macro on a given node.   | |
| void | handleMacroNode (Node &node) const | 
| Registers macros based on their type, expand conditional macros.   | |
| bool | isTruthy (const Node &node) const | 
| Check if a node can be evaluated to true.   | |
| Node | evaluate (Node &node, unsigned depth, bool is_not_body) const | 
| Evaluate only the macros.   | |
| void | throwMacroProcessingError (const std::string &message, const Node &node) | 
| Throw a macro processing error.   | |
  Protected Attributes inherited from Ark::internal::MacroExecutor | |
| unsigned int | m_debug | 
| MacroProcessor * | m_processor | 
| This is a non-owned pointer.   | |
Handles Symbol macros.
Definition at line 23 of file Symbol.hpp.
      
  | 
  overridevirtual | 
| node | |
| depth | depth of the macro processor evaluation | 
Implements Ark::internal::MacroExecutor.
Definition at line 10 of file Symbol.cpp.
References Ark::internal::MacroExecutor::applyMacroProxy(), Ark::internal::MacroExecutor::evaluate(), Ark::internal::MacroExecutor::findNearestMacro(), Ark::internal::Node::string(), and Ark::internal::Node::updateValueAndType().
      
  | 
  nodiscardoverridevirtual | 
| node | 
Implements Ark::internal::MacroExecutor.
Definition at line 5 of file Symbol.cpp.
References Ark::internal::Node::nodeType(), and Ark::internal::Symbol.
      
  | 
  explicit | 
Construct a new Macro Executor object.
| processor | |
| debug | 
Definition at line 36 of file Executor.cpp.
Returns the macro node that will be expanded.
| node | AST node on which the executor will run | 
Implements Ark::internal::MacroExecutor.
Definition at line 27 of file Symbol.cpp.
References Ark::internal::MacroExecutor::findNearestMacro(), and Ark::internal::Node::string().