diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2020-10-01 14:55:15 +0800 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2020-11-28 21:13:21 +0000 |
commit | 2ed062a0be3e2c6e7bd50d25d9ede336fad7be38 (patch) | |
tree | 3eb122d4ae25035a067ddaf78576541a75fdf9b7 /gcc/rust/parse/rust-parse.h | |
parent | 4cfd93746242dc6e73f4fa71520bb361a2d6de4a (diff) | |
download | gcc-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.h | 3 |
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 (); |