mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
cleanup, fix test case
This commit is contained in:
parent
9d962d8466
commit
f9d789fa08
@ -229,7 +229,7 @@ impl<A> DVec<A> {
|
||||
|
||||
impl<A: Copy> DVec<A> {
|
||||
/**
|
||||
* Append all elements of a vector to the end of the list.
|
||||
* Append all elements of a vector to the end of the list
|
||||
*
|
||||
* Equivalent to `append_iter()` but potentially more efficient.
|
||||
*/
|
||||
|
@ -59,7 +59,7 @@ pub enum MacResult {
|
||||
MRExpr(@ast::expr),
|
||||
MRItem(@ast::item),
|
||||
MRAny(fn@()-> @ast::expr, fn@()-> Option<@ast::item>, fn@()->@ast::stmt),
|
||||
MRDef(MacroDef),
|
||||
MRDef(MacroDef)
|
||||
}
|
||||
|
||||
pub enum SyntaxExtension {
|
||||
|
@ -217,7 +217,6 @@ pub impl Parser {
|
||||
let mut first = true;
|
||||
let mut v = ~[];
|
||||
while self.token != token::GT
|
||||
// wait... isn't this going to eat a whole '>>' ?
|
||||
&& self.token != token::BINOP(token::SHR) {
|
||||
match sep {
|
||||
Some(ref t) => {
|
||||
|
@ -244,8 +244,17 @@ mod test {
|
||||
~[],
|
||||
new_parse_sess(None));
|
||||
check_equal(to_json_str(tts as Encodable::<std::json::Encoder>),
|
||||
//[["tt_tok",["IDENT","fn"]]]
|
||||
~"abc"
|
||||
~"[[\"tt_tok\",[,[\"IDENT\",[\"fn\",false]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"foo\",false]]]],\
|
||||
[\"tt_delim\",[[[\"tt_tok\",[,[\"LPAREN\",[]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"x\",false]]]],\
|
||||
[\"tt_tok\",[,[\"COLON\",[]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"int\",false]]]],\
|
||||
[\"tt_tok\",[,[\"RPAREN\",[]]]]]]],\
|
||||
[\"tt_delim\",[[[\"tt_tok\",[,[\"LBRACE\",[]]]],\
|
||||
[\"tt_tok\",[,[\"IDENT\",[\"x\",false]]]],\
|
||||
[\"tt_tok\",[,[\"SEMI\",[]]]],\
|
||||
[\"tt_tok\",[,[\"RBRACE\",[]]]]]]]]"
|
||||
);
|
||||
let ast1 = new_parser_from_tts(new_parse_sess(None),~[],tts)
|
||||
.parse_item(~[]);
|
||||
|
Loading…
Reference in New Issue
Block a user