about summary refs log tree commit diff
path: root/src/libsyntax/ext
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2015-10-27 22:20:01 -0700
committerEli Friedman <eli.friedman@gmail.com>2015-10-28 14:11:31 -0700
commite7d3ae606ed496144554dae499b69207da3b09c5 (patch)
treecd68b8303226e9a6b1b30c70aa7d7fa3597cf326 /src/libsyntax/ext
parent56ba8feed694f46f28d9e65e132e1b62cc18e0b4 (diff)
downloadrust-e7d3ae606ed496144554dae499b69207da3b09c5.tar.gz
rust-e7d3ae606ed496144554dae499b69207da3b09c5.zip
Make quote plugin use parsing functions which explicitly panic.
Rename parse_* to parse_*_panic, and add parse_attribute_panic.
Diffstat (limited to 'src/libsyntax/ext')
-rw-r--r--src/libsyntax/ext/quote.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/libsyntax/ext/quote.rs b/src/libsyntax/ext/quote.rs
index 1e337c29f2b..59e8533a83d 100644
--- a/src/libsyntax/ext/quote.rs
+++ b/src/libsyntax/ext/quote.rs
@@ -327,7 +327,7 @@ pub fn expand_quote_expr<'cx>(cx: &'cx mut ExtCtxt,
                               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)
 }
 
@@ -335,7 +335,7 @@ pub fn expand_quote_item<'cx>(cx: &mut ExtCtxt,
                               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)
 }
 
@@ -343,7 +343,7 @@ pub fn expand_quote_pat<'cx>(cx: &'cx mut ExtCtxt,
                              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)
 }
 
@@ -351,7 +351,7 @@ pub fn expand_quote_arm(cx: &mut ExtCtxt,
                         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)
 }
 
@@ -359,7 +359,7 @@ pub fn expand_quote_ty(cx: &mut ExtCtxt,
                        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)
 }
 
@@ -367,7 +367,7 @@ pub fn expand_quote_stmt(cx: &mut ExtCtxt,
                          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)
 }
 
@@ -375,7 +375,7 @@ pub fn expand_quote_attr(cx: &mut ExtCtxt,
                          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)