aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.h
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-10-01 14:55:15 +0800
committerPhilip Herron <philip.herron@embecosm.com>2020-11-28 21:13:21 +0000
commit2ed062a0be3e2c6e7bd50d25d9ede336fad7be38 (patch)
tree3eb122d4ae25035a067ddaf78576541a75fdf9b7 /gcc/rust/parse/rust-parse.h
parent4cfd93746242dc6e73f4fa71520bb361a2d6de4a (diff)
downloadgcc-2ed062a0be3e2c6e7bd50d25d9ede336fad7be38.zip
gcc-2ed062a0be3e2c6e7bd50d25d9ede336fad7be38.tar.gz
gcc-2ed062a0be3e2c6e7bd50d25d9ede336fad7be38.tar.bz2
Improved parsing of MatchExpr (and AST structure)
Fixed compilation errors Fixed accidental break out of loop when expr_with_block when parsing match expr
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-rw-r--r--gcc/rust/parse/rust-parse.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index b2de05e..e2f3a78 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -189,6 +189,8 @@ private:
std::unique_ptr<AST::Struct>
parse_struct (AST::Visibility vis, std::vector<AST::Attribute> outer_attrs);
std::vector<AST::StructField> parse_struct_fields ();
+ template <typename EndTokenPred>
+ std::vector<AST::StructField> parse_struct_fields (EndTokenPred is_end_token);
AST::StructField parse_struct_field ();
std::vector<AST::TupleField> parse_tuple_fields ();
AST::TupleField parse_tuple_field ();
@@ -528,6 +530,7 @@ private:
= std::vector<AST::Attribute> (),
bool pratt_parse = false);
std::unique_ptr<AST::StructExprField> parse_struct_expr_field ();
+ bool will_be_expr_with_block ();
// Type-related
std::unique_ptr<AST::Type> parse_type ();