aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.h
diff options
context:
space:
mode:
authorJakub Dupak <dev@jakubdupak.com>2023-10-16 14:42:49 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 19:09:20 +0100
commit3b1d27f78720bf4cf3857f31a4d26226e2581fb1 (patch)
tree73ddf9a35bf03586194d48e18d2edc6e2e61f63a /gcc/rust/parse/rust-parse.h
parent9e7e3ea6380d4c8fe01740ce5278e84d2124fe93 (diff)
downloadgcc-3b1d27f78720bf4cf3857f31a4d26226e2581fb1.zip
gcc-3b1d27f78720bf4cf3857f31a4d26226e2581fb1.tar.gz
gcc-3b1d27f78720bf4cf3857f31a4d26226e2581fb1.tar.bz2
gccrs: ast: Parse labelled block
gcc/rust/ChangeLog: * ast/rust-ast-builder.cc (AstBuilder::block): Add label arg to constructor call. * ast/rust-expr.h (class LoopLabel): Move before BlockExpr. (class BlockExpr): Add LoopLabel member. * expand/rust-derive-clone.cc (DeriveClone::clone_fn): Add label arg to constructor call. * parse/rust-parse-impl.h (Parser::parse_block_expr): Add label parameter. (Parser::parse_labelled_loop_expr): Add label arg to constructor call. * parse/rust-parse.h: Add label arg to constructor call. Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-rw-r--r--gcc/rust/parse/rust-parse.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index d5c1219..6a69533 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -139,6 +139,7 @@ public:
std::unique_ptr<AST::BlockExpr>
parse_block_expr (AST::AttrVec outer_attrs = AST::AttrVec (),
+ AST::LoopLabel label = AST::LoopLabel::error (),
location_t pratt_parsed_loc = UNKNOWN_LOCATION);
bool is_macro_rules_def (const_TokenPtr t);
@@ -590,9 +591,9 @@ private:
AST::MatchArm parse_match_arm ();
std::vector<std::unique_ptr<AST::Pattern> >
parse_match_arm_patterns (TokenId end_token_id);
- std::unique_ptr<AST::BaseLoopExpr>
- parse_labelled_loop_expr (const_TokenPtr tok,
- AST::AttrVec outer_attrs = AST::AttrVec ());
+ std::unique_ptr<AST::Expr> parse_labelled_loop_expr (const_TokenPtr tok,
+ AST::AttrVec outer_attrs
+ = AST::AttrVec ());
AST::LoopLabel parse_loop_label (const_TokenPtr tok);
std::unique_ptr<AST::AsyncBlockExpr>
parse_async_block_expr (AST::AttrVec outer_attrs = AST::AttrVec ());