self-hosted can compile libc hello world

This commit is contained in:
Andrew Kelley
2018-07-22 23:27:58 -04:00
parent 58c5f94a99
commit 93e78ee722
15 changed files with 1359 additions and 185 deletions

View File

@@ -16,11 +16,18 @@ pub const Span = struct {
last: ast.TokenIndex,
pub fn token(i: TokenIndex) Span {
return Span {
return Span{
.first = i,
.last = i,
};
}
pub fn node(n: *ast.Node) Span {
return Span{
.first = n.firstToken(),
.last = n.lastToken(),
};
}
};
pub const Msg = struct {