lily/src/main.cpp

17 lines
445 B
C++
Raw Normal View History

2019-06-04 20:45:06 -07:00
#include "ast.hpp"
#include "pattern.hpp"
#include "parser.hpp"
int main() {
try {
2019-06-05 21:16:40 -07:00
lily::parse(
"data Bool = { True, False }\n"
"data Color = { Red, Black }\n"
2019-06-05 21:36:30 -07:00
"data IntList = { Nil, Cons(Int, IntList) }\n"
2019-06-09 19:57:58 -07:00
"defn other x y = { 3 }\n"
"defn add x y = { x + add x x }");
2019-06-04 20:45:06 -07:00
} catch(lily::error& e) {
std::cout << e.message << std::endl;
}
}