Skip to content

Commit fa5ef4c

Browse files
committed
Add the beginnings of an ast folder plus an empty module for resolve.
1 parent 5f2d35e commit fa5ef4c

File tree

6 files changed

+528
-5
lines changed

6 files changed

+528
-5
lines changed

src/comp/front/ast.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ tag stmt_ {
7676

7777
type decl = spanned[decl_];
7878
tag decl_ {
79-
decl_local(ident, option[@ty], ty);
79+
decl_local(ident, bool, option[@ty]);
8080
decl_item(name, @item);
8181
}
8282

@@ -126,8 +126,9 @@ tag mode {
126126
}
127127

128128
type slot = rec(@ty ty, mode mode, option[slot_id] id);
129+
type input = rec(slot slot, ident ident);
129130

130-
type _fn = rec(vec[rec(slot slot, ident ident)] inputs,
131+
type _fn = rec(vec[input] inputs,
131132
slot output,
132133
block body);
133134

src/comp/front/parser.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ io fn parse_item(parser p) -> tup(ast.ident, @ast.item) {
651651
fail;
652652
}
653653

654-
io fn parse_crate(parser p) -> ast.crate {
654+
io fn parse_crate(parser p) -> @ast.crate {
655655
auto lo = p.get_span();
656656
auto hi = lo;
657657
let ast._mod m = new_str_hash[@ast.item]();
@@ -660,7 +660,7 @@ io fn parse_crate(parser p) -> ast.crate {
660660
m.insert(i._0, i._1);
661661
hi = i._1.span;
662662
}
663-
ret spanned(lo, hi, rec(module=m));
663+
ret @spanned(lo, hi, rec(module=m));
664664
}
665665

666666
//

0 commit comments

Comments
 (0)