From 62abc585c06ffd76a6754d210b99a9a6438bae37 Mon Sep 17 00:00:00 2001 From: Sri Ganesh Thota Date: Wed, 4 Dec 2024 23:42:59 +0530 Subject: [PATCH] Refactor: Made formatting changes gcc/rust/ChangeLog: * parse/rust-parse-impl.h (Parser::left_denotations): Made fomatting chnagesn (Parser::null_denotation): Made formmating chnages * parse/rust-parse.h (struct ParseRestrictions): Made formatting chnages. --- gcc/rust/parse/rust-parse-impl.h | 6 ++++-- gcc/rust/parse/rust-parse.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gcc/rust/parse/rust-parse-impl.h b/gcc/rust/parse/rust-parse-impl.h index 2991a057a85..c3db2e0e032 100644 --- a/gcc/rust/parse/rust-parse-impl.h +++ b/gcc/rust/parse/rust-parse-impl.h @@ -12084,7 +12084,8 @@ Parser::left_denotations (std::unique_ptr expr, { lexer.skip_token (); if (restrictions.stop_on_token - && (current_token->get_id() == MATCH_ARROW || current_token->get_id() == COMMA)) + && (current_token->get_id() == MATCH_ARROW + || current_token->get_id() == COMMA)) { rust_debug ("Stopping parsing at restricted token in left_denotations"); return expr; @@ -12127,7 +12128,8 @@ Parser::null_denotation (const_TokenPtr tok, /* note: tok is previous character in input stream, not current one, as * parse_expr skips it before passing it in */ - if (restrictions.stop_on_token && (tok->get_id() == MATCH_ARROW || tok->get_id() == COMMA)) + if (restrictions.stop_on_token + && (tok->get_id() == MATCH_ARROW || tok->get_id() == COMMA)) { rust_debug("Stopping parsing at restricted token in null_denotation"); return nullptr; diff --git a/gcc/rust/parse/rust-parse.h b/gcc/rust/parse/rust-parse.h index 5f09c4846ce..26e9bfc3273 100644 --- a/gcc/rust/parse/rust-parse.h +++ b/gcc/rust/parse/rust-parse.h @@ -89,7 +89,8 @@ struct ParseRestrictions bool entered_from_unary = false; bool expr_can_be_null = false; bool expr_can_be_stmt = false; - bool stop_on_token = false; // This is for stopping parsing at a specific token + bool stop_on_token + = false; // This is for stopping parsing at a specific token bool consume_semi = true; /* Macro invocations that are statements can expand without a semicolon after * the final statement, if it's an expression statement. */