ArkScript
A small, fast, functional and scripting language for video games
List.hpp
Go to the documentation of this file.
1 /**
2  * @file List.hpp
3  * @author Ray John Alovera ([email protected])
4  * @brief Executor for List Macros
5  * @version 0.3
6  * @date 2021-05-04
7  *
8  * @copyright Copyright (c) 2021
9  *
10  */
11 
12 #ifndef MACROS_EXECUTORS_LIST_HPP
13 #define MACROS_EXECUTORS_LIST_HPP
14 
17 
18 namespace Ark::internal
19 {
20  /**
21  * @brief Handles List macros
22  *
23  */
24  class ListExecutor : public MacroExecutor
25  {
26  public:
28 
29  bool applyMacro(Node& node) override;
30  bool canHandle(Node& node) override;
31  };
32 
33 }
34 
35 #endif
The base class for all MacroExecutors.
AST node used by the parser, optimizer and compiler.
Handles List macros.
Definition: List.hpp:25
bool applyMacro(Node &node) override
Executes macros in the Node if the Executor can handle it.
Definition: List.cpp:10
bool canHandle(Node &node) override
Checks if the executor can apply a macro on the passed Node.
Definition: List.cpp:5
A class that applies macros in a Node.
Definition: Executor.hpp:28
MacroExecutor(MacroProcessor *macroprocessor, unsigned debug=0)
Construct a new Macro Executor object.
Definition: Executor.cpp:7
A node of an Abstract Syntax Tree for ArkScript.
Definition: Node.hpp:29