Skip to content

Commit b86ad1a

Browse files
committed
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.
1 parent fdf7178 commit b86ad1a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

gcc/rust/parse/rust-parse-impl.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -12084,7 +12084,8 @@ Parser<ManagedTokenSource>::left_denotations (std::unique_ptr<AST::Expr> expr,
1208412084
{
1208512085
lexer.skip_token ();
1208612086
if (restrictions.stop_on_token
12087-
&& (current_token->get_id() == MATCH_ARROW || current_token->get_id() == COMMA))
12087+
&& (current_token->get_id() == MATCH_ARROW
12088+
|| current_token->get_id() == COMMA))
1208812089
{
1208912090
rust_debug ("Stopping parsing at restricted token in left_denotations");
1209012091
return expr;
@@ -12127,7 +12128,8 @@ Parser<ManagedTokenSource>::null_denotation (const_TokenPtr tok,
1212712128
/* note: tok is previous character in input stream, not current one, as
1212812129
* parse_expr skips it before passing it in */
1212912130

12130-
if (restrictions.stop_on_token && (tok->get_id() == MATCH_ARROW || tok->get_id() == COMMA))
12131+
if (restrictions.stop_on_token
12132+
&& (tok->get_id() == MATCH_ARROW || tok->get_id() == COMMA))
1213112133
{
1213212134
rust_debug("Stopping parsing at restricted token in null_denotation");
1213312135
return nullptr;

gcc/rust/parse/rust-parse.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,8 @@ struct ParseRestrictions
8989
bool entered_from_unary = false;
9090
bool expr_can_be_null = false;
9191
bool expr_can_be_stmt = false;
92-
bool stop_on_token = false; // This is for stopping parsing at a specific token
92+
bool stop_on_token
93+
= false; // This is for stopping parsing at a specific token
9394
bool consume_semi = true;
9495
/* Macro invocations that are statements can expand without a semicolon after
9596
* the final statement, if it's an expression statement. */

0 commit comments

Comments
 (0)