parent
58c82a8da2
commit
cfdf193c46
94 changed files with 289 additions and 288 deletions
|
@ -210,7 +210,7 @@ fn expect_gt(p: parser) {
|
|||
}
|
||||
}
|
||||
|
||||
fn spanned<@T>(lo: uint, hi: uint, node: T) -> spanned<T> {
|
||||
fn spanned<T>(lo: uint, hi: uint, node: T) -> spanned<T> {
|
||||
ret {node: node, span: ast_util::mk_sp(lo, hi)};
|
||||
}
|
||||
|
||||
|
@ -595,7 +595,7 @@ fn parse_fn_block_arg(p: parser) -> ast::arg {
|
|||
ret {mode: m, ty: t, ident: i, id: p.get_id()};
|
||||
}
|
||||
|
||||
fn parse_seq_to_before_gt<@T>(sep: option::t<token::token>,
|
||||
fn parse_seq_to_before_gt<T>(sep: option::t<token::token>,
|
||||
f: fn@(parser) -> T,
|
||||
p: parser) -> [T] {
|
||||
let first = true;
|
||||
|
@ -612,7 +612,7 @@ fn parse_seq_to_before_gt<@T>(sep: option::t<token::token>,
|
|||
ret v;
|
||||
}
|
||||
|
||||
fn parse_seq_to_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
|
||||
fn parse_seq_to_gt<T>(sep: option::t<token::token>, f: fn@(parser) -> T,
|
||||
p: parser) -> [T] {
|
||||
let v = parse_seq_to_before_gt(sep, f, p);
|
||||
expect_gt(p);
|
||||
|
@ -620,7 +620,7 @@ fn parse_seq_to_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
|
|||
ret v;
|
||||
}
|
||||
|
||||
fn parse_seq_lt_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
|
||||
fn parse_seq_lt_gt<T>(sep: option::t<token::token>, f: fn@(parser) -> T,
|
||||
p: parser) -> spanned<[T]> {
|
||||
let lo = p.get_lo_pos();
|
||||
expect(p, token::LT);
|
||||
|
@ -630,14 +630,14 @@ fn parse_seq_lt_gt<@T>(sep: option::t<token::token>, f: fn@(parser) -> T,
|
|||
ret spanned(lo, hi, result);
|
||||
}
|
||||
|
||||
fn parse_seq_to_end<@T>(ket: token::token, sep: option::t<token::token>,
|
||||
fn parse_seq_to_end<T>(ket: token::token, sep: option::t<token::token>,
|
||||
f: fn(parser) -> T, p: parser) -> [T] {
|
||||
let val = parse_seq_to_before_end(ket, sep, f, p);
|
||||
p.bump();
|
||||
ret val;
|
||||
}
|
||||
|
||||
fn parse_seq_to_before_end<@T>(ket: token::token,
|
||||
fn parse_seq_to_before_end<T>(ket: token::token,
|
||||
sep: option::t<token::token>,
|
||||
f: fn@(parser) -> T, p: parser) -> [T] {
|
||||
let first: bool = true;
|
||||
|
@ -653,7 +653,7 @@ fn parse_seq_to_before_end<@T>(ket: token::token,
|
|||
}
|
||||
|
||||
|
||||
fn parse_seq<@T>(bra: token::token, ket: token::token,
|
||||
fn parse_seq<T>(bra: token::token, ket: token::token,
|
||||
sep: option::t<token::token>, f: fn@(parser) -> T, p: parser)
|
||||
-> spanned<[T]> {
|
||||
let lo = p.get_lo_pos();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue