mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 10:45:18 +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> {
|
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.
|
* Equivalent to `append_iter()` but potentially more efficient.
|
||||||
*/
|
*/
|
||||||
|
@ -59,7 +59,7 @@ pub enum MacResult {
|
|||||||
MRExpr(@ast::expr),
|
MRExpr(@ast::expr),
|
||||||
MRItem(@ast::item),
|
MRItem(@ast::item),
|
||||||
MRAny(fn@()-> @ast::expr, fn@()-> Option<@ast::item>, fn@()->@ast::stmt),
|
MRAny(fn@()-> @ast::expr, fn@()-> Option<@ast::item>, fn@()->@ast::stmt),
|
||||||
MRDef(MacroDef),
|
MRDef(MacroDef)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub enum SyntaxExtension {
|
pub enum SyntaxExtension {
|
||||||
|
@ -217,7 +217,6 @@ pub impl Parser {
|
|||||||
let mut first = true;
|
let mut first = true;
|
||||||
let mut v = ~[];
|
let mut v = ~[];
|
||||||
while self.token != token::GT
|
while self.token != token::GT
|
||||||
// wait... isn't this going to eat a whole '>>' ?
|
|
||||||
&& self.token != token::BINOP(token::SHR) {
|
&& self.token != token::BINOP(token::SHR) {
|
||||||
match sep {
|
match sep {
|
||||||
Some(ref t) => {
|
Some(ref t) => {
|
||||||
|
@ -244,8 +244,17 @@ mod test {
|
|||||||
~[],
|
~[],
|
||||||
new_parse_sess(None));
|
new_parse_sess(None));
|
||||||
check_equal(to_json_str(tts as Encodable::<std::json::Encoder>),
|
check_equal(to_json_str(tts as Encodable::<std::json::Encoder>),
|
||||||
//[["tt_tok",["IDENT","fn"]]]
|
~"[[\"tt_tok\",[,[\"IDENT\",[\"fn\",false]]]],\
|
||||||
~"abc"
|
[\"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)
|
let ast1 = new_parser_from_tts(new_parse_sess(None),~[],tts)
|
||||||
.parse_item(~[]);
|
.parse_item(~[]);
|
||||||
|
Loading…
Reference in New Issue
Block a user