Update Rust
This commit is contained in:
parent
f1c4e09ac3
commit
166296db30
3 changed files with 12 additions and 10 deletions
|
@ -9,13 +9,14 @@ extern crate syntax;
|
|||
extern crate maud;
|
||||
|
||||
use rustc_plugin::Registry;
|
||||
use syntax::ast::{Expr, TokenTree};
|
||||
use syntax::ast::Expr;
|
||||
use syntax::codemap::{DUMMY_SP, Span};
|
||||
use syntax::errors::FatalError;
|
||||
use syntax::ext::base::{DummyResult, ExtCtxt, MacEager, MacResult};
|
||||
use syntax::parse::token;
|
||||
use syntax::print::pprust;
|
||||
use syntax::ptr::P;
|
||||
use syntax::tokenstream::TokenTree;
|
||||
|
||||
mod parse;
|
||||
mod render;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
use std::mem;
|
||||
use std::rc::Rc;
|
||||
use syntax::ast::{Delimited, Expr, ExprKind, Lit, LitKind, Stmt, TokenTree};
|
||||
use syntax::ast::{Expr, ExprKind, Lit, LitKind, Stmt};
|
||||
use syntax::ext::quote::rt::ToTokens;
|
||||
use syntax::codemap::Span;
|
||||
use syntax::errors::{DiagnosticBuilder, FatalError};
|
||||
|
@ -10,6 +9,7 @@ use syntax::parse::parser::Parser as RustParser;
|
|||
use syntax::parse::token::{BinOpToken, DelimToken, Token, Lit as LitToken};
|
||||
use syntax::parse::token::keywords;
|
||||
use syntax::ptr::P;
|
||||
use syntax::tokenstream::{Delimited, TokenTree};
|
||||
|
||||
use super::render::Renderer;
|
||||
use super::PResult;
|
||||
|
@ -398,12 +398,12 @@ impl<'cx, 'a, 'i> Parser<'cx, 'a, 'i> {
|
|||
expr.push(tt.clone());
|
||||
},
|
||||
}}
|
||||
body.push(TokenTree::Delimited(sp, Rc::new(Delimited {
|
||||
delim: DelimToken::Brace,
|
||||
open_span: sp,
|
||||
tts: expr,
|
||||
close_span: sp,
|
||||
})));
|
||||
body.push(TokenTree::Delimited(sp, Delimited {
|
||||
delim: DelimToken::Brace,
|
||||
open_span: sp,
|
||||
tts: expr,
|
||||
close_span: sp,
|
||||
}));
|
||||
Ok(body)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
use syntax::ast::{Expr, Ident, Pat, Stmt, TokenTree};
|
||||
use syntax::ast::{Expr, Ident, Pat, Stmt};
|
||||
use syntax::codemap::DUMMY_SP;
|
||||
use syntax::ext::base::ExtCtxt;
|
||||
use syntax::parse::token;
|
||||
use syntax::ptr::P;
|
||||
use syntax::tokenstream::TokenTree;
|
||||
|
||||
use maud::Escaper;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue