// and those with brackets will be formatted as array literals.
use syntax::ast;
-use syntax::parse::token::{Eof, Comma, Token};
-use syntax::parse::{ParseSess, tts_to_parser};
+use syntax::parse::token::Token;
+use syntax::parse::tts_to_parser;
use syntax::codemap::{mk_sp, BytePos};
use Indent;
};
}
- let parse_session = ParseSess::new();
- let mut parser = tts_to_parser(&parse_session, mac.node.tts.clone(), Vec::new());
+ let mut parser = tts_to_parser(context.parse_session, mac.node.tts.clone(), Vec::new());
let mut expr_vec = Vec::new();
loop {
- expr_vec.push(match parser.parse_expr_nopanic() {
+ expr_vec.push(match parser.parse_expr() {
Ok(expr) => expr,
Err(..) => return None,
});