Skip to content

Commit bc40f3c

Browse files
committed
---
yaml --- r: 956 b: refs/heads/master c: 78ec077 h: refs/heads/master v: v3
1 parent 9096f3a commit bc40f3c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 9769b612261d6000b969ce466c4033f8445d3474
2+
refs/heads/master: 78ec07790a90813cf4f42df0246ea9c27892745f

trunk/src/comp/front/ast.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import util.common.spanned;
77
import util.common.ty_mach;
88

99
type ident = str;
10-
type ty_param = ident;
1110

1211
type name_ = rec(ident ident, vec[@ty] types);
1312
type name = spanned[name_];
@@ -17,6 +16,8 @@ type crate_num = int;
1716
type def_num = int;
1817
type def_id = tup(crate_num, def_num);
1918

19+
type ty_param = rec(ident ident, def_id id);
20+
2021
// Annotations added during successive passes.
2122
tag ann {
2223
ann_none;

trunk/src/comp/front/parser.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1039,10 +1039,15 @@ impure fn parse_block(parser p) -> ast.block {
10391039
ret spanned(stmts.span, stmts.span, b);
10401040
}
10411041

1042+
impure fn parse_ty_param(parser p) -> ast.ty_param {
1043+
auto ident = parse_ident(p);
1044+
ret rec(ident=ident, id=p.next_def_id());
1045+
}
1046+
10421047
impure fn parse_ty_params(parser p) -> vec[ast.ty_param] {
10431048
let vec[ast.ty_param] ty_params = vec();
10441049
if (p.peek() == token.LBRACKET) {
1045-
auto f = parse_ident; // FIXME: pass as lval directly
1050+
auto f = parse_ty_param; // FIXME: pass as lval directly
10461051
ty_params = parse_seq[ast.ty_param](token.LBRACKET, token.RBRACKET,
10471052
some(token.COMMA), f, p).node;
10481053
}

0 commit comments

Comments
 (0)