17 lines
445 B
C++
17 lines
445 B
C++
#include "ast.hpp"
|
|
#include "pattern.hpp"
|
|
#include "parser.hpp"
|
|
|
|
int main() {
|
|
try {
|
|
lily::parse(
|
|
"data Bool = { True, False }\n"
|
|
"data Color = { Red, Black }\n"
|
|
"data IntList = { Nil, Cons(Int, IntList) }\n"
|
|
"defn other x y = { 3 }\n"
|
|
"defn add x y = { x + add x x }");
|
|
} catch(lily::error& e) {
|
|
std::cout << e.message << std::endl;
|
|
}
|
|
}
|