sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'cx> {
- let expanded = expand_parse_call(cx, sp, "parse_expr", vec!(), tts);
+ let expanded = expand_parse_call(cx, sp, "parse_expr_panic", vec!(), tts);
base::MacEager::expr(expanded)
}
sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'cx> {
- let expanded = expand_parse_call(cx, sp, "parse_item", vec!(), tts);
+ let expanded = expand_parse_call(cx, sp, "parse_item_panic", vec!(), tts);
base::MacEager::expr(expanded)
}
sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'cx> {
- let expanded = expand_parse_call(cx, sp, "parse_pat", vec!(), tts);
+ let expanded = expand_parse_call(cx, sp, "parse_pat_panic", vec!(), tts);
base::MacEager::expr(expanded)
}
sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'static> {
- let expanded = expand_parse_call(cx, sp, "parse_arm", vec!(), tts);
+ let expanded = expand_parse_call(cx, sp, "parse_arm_panic", vec!(), tts);
base::MacEager::expr(expanded)
}
sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'static> {
- let expanded = expand_parse_call(cx, sp, "parse_ty", vec!(), tts);
+ let expanded = expand_parse_call(cx, sp, "parse_ty_panic", vec!(), tts);
base::MacEager::expr(expanded)
}
sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'static> {
- let expanded = expand_parse_call(cx, sp, "parse_stmt", vec!(), tts);
+ let expanded = expand_parse_call(cx, sp, "parse_stmt_panic", vec!(), tts);
base::MacEager::expr(expanded)
}
sp: Span,
tts: &[ast::TokenTree])
-> Box<base::MacResult+'static> {
- let expanded = expand_parse_call(cx, sp, "parse_attribute",
+ let expanded = expand_parse_call(cx, sp, "parse_attribute_panic",
vec!(cx.expr_bool(sp, true)), tts);
base::MacEager::expr(expanded)
// Panicing fns (for now!)
// These functions are used by the quote_*!() syntax extensions, but shouldn't
// be used otherwise.
- pub fn parse_expr(&mut self) -> P<Expr> {
+ pub fn parse_expr_panic(&mut self) -> P<Expr> {
panictry!(self.parse_expr_nopanic())
}
- pub fn parse_item(&mut self) -> Option<P<Item>> {
+ pub fn parse_item_panic(&mut self) -> Option<P<Item>> {
panictry!(self.parse_item_nopanic())
}
- pub fn parse_pat(&mut self) -> P<Pat> {
+ pub fn parse_pat_panic(&mut self) -> P<Pat> {
panictry!(self.parse_pat_nopanic())
}
- pub fn parse_arm(&mut self) -> Arm {
+ pub fn parse_arm_panic(&mut self) -> Arm {
panictry!(self.parse_arm_nopanic())
}
- pub fn parse_ty(&mut self) -> P<Ty> {
+ pub fn parse_ty_panic(&mut self) -> P<Ty> {
panictry!(self.parse_ty_nopanic())
}
- pub fn parse_stmt(&mut self) -> Option<P<Stmt>> {
+ pub fn parse_stmt_panic(&mut self) -> Option<P<Stmt>> {
panictry!(self.parse_stmt_nopanic())
}
+ pub fn parse_attribute_panic(&mut self, permit_inner: bool) -> ast::Attribute {
+ panictry!(self.parse_attribute(permit_inner))
+ }
+
/// Convert a token to a string using self's reader
pub fn token_to_string(token: &token::Token) -> String {
pprust::token_to_string(token)