19 #include "antlr4-runtime.h"
21 #include <torquescript/astvisitor.hpp>
22 #include <torquescript/codeblock.hpp>
23 #include <torquescript/stringtable.hpp>
24 #include <torquescript/instructions.hpp>
25 #include <torquescript/interpreterconfiguration.hpp>
26 #include <torquescript/instructionsequence.hpp>
58 virtual antlrcpp::Any defaultResult()
override;
59 virtual antlrcpp::Any aggregateResult(antlrcpp::Any& aggregate, antlrcpp::Any& nextResult)
override;
64 std::string mCurrentPackage;
76 virtual antlrcpp::Any visitAddNode(
AST::AddNode* expression)
override;
78 virtual antlrcpp::Any visitFloatNode(
AST::FloatNode* value)
override;
85 virtual antlrcpp::Any visitNegateNode(
AST::NegateNode* expression)
override;
86 virtual antlrcpp::Any visitNotNode(
AST::NotNode* expression)
override;
88 virtual antlrcpp::Any visitWhileNode(
AST::WhileNode* node)
override;
89 virtual antlrcpp::Any visitForNode(
AST::ForNode* node)
override;
90 virtual antlrcpp::Any visitBreakNode(
AST::BreakNode* node)
override;
94 virtual antlrcpp::Any visitIfNode(
AST::IfNode* node)
override;
95 virtual antlrcpp::Any visitArrayNode(
AST::ArrayNode* array)
override;
96 virtual antlrcpp::Any visitEqualsNode(
AST::EqualsNode* expression)
override;
97 virtual antlrcpp::Any visitConcatNode(
AST::ConcatNode* expression)
override;
99 virtual antlrcpp::Any visitDivideNode(
AST::DivideNode* expression)
override;
Definition: astvisitor.hpp:65
A CodeBlock defines a piece of executable code generated from a single input (Ie. a file)....
Definition: codeblock.hpp:37
Primary compiler class. This class is an AST visitor that walks the AST tree generated by a AST::ASTB...
Definition: compiler.hpp:35
CodeBlock * compileStream(std::istream &input, StringTable *stringTable)
Ask the compiler to generate a codeblock from the provided stream.
CodeBlock * compileString(const std::string &input, StringTable *stringTable)
Ask the compiler to generate a codeblock from the provided string.
CodeBlock * compileFile(const std::string &path, StringTable *stringTable)
Ask the compiler to generate a codeblock from the provided file.
A string table maintains a mapping of numeric identifiers to their raw string values....
Definition: stringtable.hpp:32
A structure representing overall interpreter runtime configuration. Some settings can be changed at r...
Definition: interpreterconfiguration.hpp:26