- Created a new VSCode Extension subproject - Created a new Bolt CLI subproject - Created a new Bolt Language Server subproject - Created a new Bolt Compiler subproject - Moved most existing code to the new Compiler subproject - Added a small language server - Laid the foundations for a Hindley-Milner type checker - Fixed some bugs and type errors in the compiler - Removed the unused testing infrastructure - Added an example parser test that should be run with Ava
25 lines
319 B
Text
25 lines
319 B
Text
|
|
fn (a: int) == (b: int) -> int;
|
|
fn (a: int) - (b: int) -> int;
|
|
fn (a: int) * (b: int) -> int;
|
|
|
|
fn write(data: String);
|
|
|
|
struct Point<NumT> {
|
|
x: NumT,
|
|
y: NumT,
|
|
}
|
|
|
|
trait Print {
|
|
fn print(self);
|
|
}
|
|
|
|
impl Print for Point {
|
|
fn print(self) {
|
|
write("A point!");
|
|
}
|
|
}
|
|
|
|
let p1 = Point { x: 1, y: 2 }
|
|
|
|
p1.printer();
|