statement node added

This commit is contained in:
ProgramSnail 2023-07-26 14:21:33 +03:00
parent b4ce56b5f7
commit 6b74398f8c
7 changed files with 108 additions and 60 deletions

View file

@ -2,9 +2,11 @@
#include <iostream>
#include <sstream>
#include "basic_printers.hpp"
#include "error_handling.hpp"
#include "expression_nodes.hpp"
#include "statement_builders.hpp"
#include "statement_printers.hpp"
#include "type_nodes.hpp"
int main(int argc, char **argv) {
@ -37,6 +39,9 @@ int main(int argc, char **argv) {
nodes::ExpressionStorage expression_storage;
nodes::TypeStorage type_storage;
builders::build_source_file(parse_tree.get_root(), expression_storage,
type_storage);
auto statements = builders::build_source_file(
parse_tree.get_root(), expression_storage, type_storage);
printers::Printer printer(std::cout, 2, 80, false);
printers::print_source_file(statements, printer);
}