diff options
author | SimplyTheOther <simplytheother@gmail.com> | 2020-12-13 17:21:38 +0800 |
---|---|---|
committer | SimplyTheOther <simplytheother@gmail.com> | 2020-12-13 17:21:38 +0800 |
commit | a697962166a9c72e568814e09658a896fc92fef5 (patch) | |
tree | 8b59c0bbd80e26ad3e69865cf90b5487c733f7c1 /gcc/rust/parse/rust-parse-impl.h | |
parent | 4490d49331a092775ebd3d38bec14b2eb7d98998 (diff) | |
download | gcc-a697962166a9c72e568814e09658a896fc92fef5.zip gcc-a697962166a9c72e568814e09658a896fc92fef5.tar.gz gcc-a697962166a9c72e568814e09658a896fc92fef5.tar.bz2 |
Modified binding power used when parsing expression inside index expr
Diffstat (limited to 'gcc/rust/parse/rust-parse-impl.h')
-rw-r--r-- | gcc/rust/parse/rust-parse-impl.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index bade40c..74b6510 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -13681,12 +13681,14 @@ Parser<ManagedTokenSource>::parse_tuple_index_expr ( template <typename ManagedTokenSource> std::unique_ptr<AST::ArrayIndexExpr> Parser<ManagedTokenSource>::parse_index_expr ( - const_TokenPtr tok ATTRIBUTE_UNUSED, std::unique_ptr<AST::Expr> array_expr, - std::vector<AST::Attribute> outer_attrs, ParseRestrictions restrictions) + const_TokenPtr, std::unique_ptr<AST::Expr> array_expr, + std::vector<AST::Attribute> outer_attrs, ParseRestrictions) { // parse RHS (as tok has already been consumed in parse_expression) - std::unique_ptr<AST::Expr> index_expr - = parse_expr (LBP_ARRAY_REF, std::vector<AST::Attribute> (), restrictions); + /*std::unique_ptr<AST::Expr> index_expr + = parse_expr (LBP_ARRAY_REF, std::vector<AST::Attribute> (), restrictions);*/ + // TODO: conceptually, should treat [] as brackets, so just parse all expr + std::unique_ptr<AST::Expr> index_expr = parse_expr (); if (index_expr == nullptr) return nullptr; |