diff options
| author | bors <bors@rust-lang.org> | 2015-11-14 08:03:14 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2015-11-14 08:03:14 +0000 |
| commit | 929ca3cb51ccb1c47ac4a330f50d8ae8ded1ba06 (patch) | |
| tree | d72602d2dee020e6d226e868c3e81b814d9ec452 /src/libsyntax/parse | |
| parent | 45087f36cea574ef13ae25afb10b1a76571275aa (diff) | |
| parent | 44d8abcc0f372dbc7ad58f312303d2e59612dec9 (diff) | |
| download | rust-929ca3cb51ccb1c47ac4a330f50d8ae8ded1ba06.tar.gz rust-929ca3cb51ccb1c47ac4a330f50d8ae8ded1ba06.zip | |
Auto merge of #29825 - KyleMayes:move-parse-panic, r=sanxiyn
Since these functions are only used by the AST quoting syntax extensions, they should be there instead of in the parser.
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index c82c6dcdea3..bde910838cb 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -362,53 +362,6 @@ impl<'a> Parser<'a> { } } - // Panicing fns (for now!) - // These functions are used by the quote_*!() syntax extensions, but shouldn't - // be used otherwise. - pub fn parse_expr_panic(&mut self) -> P<Expr> { - panictry!(self.parse_expr()) - } - - pub fn parse_item_panic(&mut self) -> Option<P<Item>> { - panictry!(self.parse_item()) - } - - pub fn parse_pat_panic(&mut self) -> P<Pat> { - panictry!(self.parse_pat()) - } - - pub fn parse_arm_panic(&mut self) -> Arm { - panictry!(self.parse_arm()) - } - - pub fn parse_ty_panic(&mut self) -> P<Ty> { - panictry!(self.parse_ty()) - } - - pub fn parse_stmt_panic(&mut self) -> Option<P<Stmt>> { - panictry!(self.parse_stmt()) - } - - pub fn parse_attribute_panic(&mut self, permit_inner: bool) -> ast::Attribute { - panictry!(self.parse_attribute(permit_inner)) - } - - pub fn parse_arg_panic(&mut self) -> Arg { - panictry!(self.parse_arg()) - } - - pub fn parse_block_panic(&mut self) -> P<Block> { - panictry!(self.parse_block()) - } - - pub fn parse_meta_item_panic(&mut self) -> P<ast::MetaItem> { - panictry!(self.parse_meta_item()) - } - - pub fn parse_path_panic(&mut self, mode: PathParsingMode) -> ast::Path { - panictry!(self.parse_path(mode)) - } - /// Convert a token to a string using self's reader pub fn token_to_string(token: &token::Token) -> String { pprust::token_to_string(token) |
