lily/src/parser.hpp

24 lines
494 B
C++

#pragma once
#include <string>
#include <map>
#include "error.hpp"
#include "ast.hpp"
#include "function.hpp"
#include "type.hpp"
#include "data.hpp"
namespace lily {
struct program {
int next_free_type_id;
std::map<std::string, type_ptr> types;
std::map<std::string, constructor> constructors;
std::map<std::string, function> functions;
program();
};
typedef std::unique_ptr<program> program_ptr;
program_ptr parse(std::string s);
}