Rollup merge of #34385 - cgswords:tstream, r=nrc

syntax-[breaking-change] cc #31645
(Only breaking because ast::TokenTree is now tokenstream::TokenTree.)

This pull request refactors TokenTrees into their own file as src/libsyntax/tokenstream.rs, moving them out of src/libsyntax/ast.rs, in order to prepare for an accompanying TokenStream implementation (per RFC 1566).
This commit is contained in:
Jeffrey Seyfried
2016-06-25 22:35:30 +00:00
34 changed files with 342 additions and 287 deletions

View File

@@ -13,12 +13,13 @@ use syntax::ext::base;
use syntax::ext::build::AstBuilder;
use syntax::parse::token;
use syntax_pos;
use syntax::tokenstream;
use std::string::String;
pub fn expand_syntax_ext(cx: &mut base::ExtCtxt,
sp: syntax_pos::Span,
tts: &[ast::TokenTree])
tts: &[tokenstream::TokenTree])
-> Box<base::MacResult+'static> {
let es = match base::get_exprs_from_tts(cx, sp, tts) {
Some(e) => e,