mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-25 13:07:13 +00:00
bool literals, fixes
This commit is contained in:
parent
b1aff1935d
commit
d31979166e
24 changed files with 179 additions and 46 deletions
|
|
@ -5,8 +5,10 @@
|
|||
// for clangd
|
||||
#include "contexts.hpp"
|
||||
#include "global_info.hpp"
|
||||
#include "interpreter_tree.hpp"
|
||||
#include "type_info_contexts.hpp"
|
||||
#include "visitor.hpp"
|
||||
#include "error_handling.hpp"
|
||||
|
||||
namespace interpreter {
|
||||
|
||||
|
|
@ -14,11 +16,20 @@ class ExecuteVisitor : public Visitor {
|
|||
public:
|
||||
explicit ExecuteVisitor(info::GlobalInfo& global_info,
|
||||
info::TypeInfoContextManager& type_info_context_manager,
|
||||
info::ContextManager& context_manager)
|
||||
info::ContextManager& context_manager,
|
||||
interpreter::tokens::PartitionStatement* execution_root)
|
||||
: namespace_visitor_(global_info.CreateVisitor()),
|
||||
type_info_context_manager_(type_info_context_manager),
|
||||
context_manager_(context_manager) {}
|
||||
|
||||
void VisitSourceFile(SourceFile* source_file) override {
|
||||
error_handling::HandleInternalError("VisitSourceFile unavailible", "ExecuteVisitor.VisitSourceFile");
|
||||
};
|
||||
|
||||
void ExecutePartition(interpreter::tokens::PartitionStatement* partition) {
|
||||
Visit(partition);
|
||||
}
|
||||
|
||||
private:
|
||||
// Sources -----------------
|
||||
|
||||
|
|
@ -39,8 +50,7 @@ private:
|
|||
void Visit(TypeDefinitionStatement* node) override;
|
||||
void Visit(AbstractTypeDefinitionStatement* node) override;
|
||||
void Visit(TypeclassDefinitionStatement* node) override;
|
||||
void Visit(ExecutableStatement* node) override;
|
||||
void Visit(TestStatement* node) override;
|
||||
void Visit(PartitionStatement* node) override;
|
||||
|
||||
// Definition parts
|
||||
|
||||
|
|
@ -125,6 +135,7 @@ private:
|
|||
void Visit(StringLiteral* node) override;
|
||||
void Visit(CharLiteral* node) override;
|
||||
void Visit(UnitLiteral* node) override;
|
||||
void Visit(BoolLiteral* node) override;
|
||||
|
||||
private:
|
||||
info::GlobalInfo::NamespaceVisitor namespace_visitor_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue