From: Tom Tromey Date: Fri, 28 Apr 2023 14:25:00 +0000 (-0600) Subject: Rearrange parser_state X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=78655a10f7718f2596c0ae2a9a401e2597c5041f;p=binutils-gdb.git Rearrange parser_state This patch mildly rearranges parser_state, moving all the bool fields together. --- diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index e92b4804f47..39046d04c8d 100644 --- a/gdb/parser-defs.h +++ b/gdb/parser-defs.h @@ -153,10 +153,10 @@ struct parser_state : public expr_builder : expr_builder (lang, gdbarch), expression_context_block (context_block), expression_context_pc (context_pc), - comma_terminates ((flags & PARSER_COMMA_TERMINATES) != 0), lexptr (input), - parse_completion (completion), block_tracker (tracker), + comma_terminates ((flags & PARSER_COMMA_TERMINATES) != 0), + parse_completion (completion), void_context_p ((flags & PARSER_VOID_CONTEXT) != 0) { } @@ -275,10 +275,6 @@ struct parser_state : public expr_builder point. */ const CORE_ADDR expression_context_pc; - /* Nonzero means stop parsing on first comma (if not within parentheses). */ - - bool comma_terminates; - /* During parsing of a C expression, the pointer to the next character is in this variable. */ @@ -292,15 +288,18 @@ struct parser_state : public expr_builder int arglist_len = 0; - /* True if parsing an expression to attempt completion. */ - bool parse_completion; - /* Completion state is updated here. */ std::unique_ptr m_completion_state; /* The innermost block tracker. */ innermost_block_tracker *block_tracker; + /* Nonzero means stop parsing on first comma (if not within parentheses). */ + bool comma_terminates; + + /* True if parsing an expression to attempt completion. */ + bool parse_completion; + /* True if no value is expected from the expression. */ bool void_context_p;