lily/src/parser.hpp

24 lines
494 B
C++
Raw Normal View History

2019-06-04 20:45:06 -07:00
#pragma once
#include <string>
#include <map>
#include "error.hpp"
#include "ast.hpp"
#include "function.hpp"
2019-06-05 21:16:40 -07:00
#include "type.hpp"
#include "data.hpp"
2019-06-04 20:45:06 -07:00
namespace lily {
struct program {
2019-06-05 21:16:40 -07:00
int next_free_type_id;
std::map<std::string, type_ptr> types;
std::map<std::string, constructor> constructors;
2019-06-04 20:45:06 -07:00
std::map<std::string, function> functions;
2019-06-05 21:16:40 -07:00
program();
2019-06-04 20:45:06 -07:00
};
typedef std::unique_ptr<program> program_ptr;
program_ptr parse(std::string s);
}