aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/parse/rust-parse.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-02-08 13:26:07 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-09 09:47:13 +0000
commit60cccd8e58f2a024676599cc00971a6e406e6d42 (patch)
treefbdf44ca68e745e5af0d89fb16789570673c8a75 /gcc/rust/parse/rust-parse.h
parent9f3ddb35959606cbf7059362acfc27a9966ac3d4 (diff)
downloadgcc-60cccd8e58f2a024676599cc00971a6e406e6d42.zip
gcc-60cccd8e58f2a024676599cc00971a6e406e6d42.tar.gz
gcc-60cccd8e58f2a024676599cc00971a6e406e6d42.tar.bz2
Fixes parsing if expressions as part of an expression.
This allows for rust style ternery expressions. Fixes #214
Diffstat (limited to 'gcc/rust/parse/rust-parse.h')
-rw-r--r--gcc/rust/parse/rust-parse.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h
index 2778ec7..aeda82b 100644
--- a/gcc/rust/parse/rust-parse.h
+++ b/gcc/rust/parse/rust-parse.h
@@ -480,10 +480,12 @@ private:
bool pratt_parse = false);
std::unique_ptr<AST::IfExpr>
parse_if_expr (std::vector<AST::Attribute> outer_attrs
- = std::vector<AST::Attribute> ());
+ = std::vector<AST::Attribute> (),
+ bool pratt_parse = false);
std::unique_ptr<AST::IfLetExpr>
parse_if_let_expr (std::vector<AST::Attribute> outer_attrs
- = std::vector<AST::Attribute> ());
+ = std::vector<AST::Attribute> (),
+ bool pratt_parse = false);
std::unique_ptr<AST::LoopExpr>
parse_loop_expr (std::vector<AST::Attribute> outer_attrs
= std::vector<AST::Attribute> (),