diff options
author | Tom Tromey <tromey@adacore.com> | 2023-04-28 08:25:00 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-05-23 13:57:54 -0600 |
commit | 78655a10f7718f2596c0ae2a9a401e2597c5041f (patch) | |
tree | 117769ceb68db8d2a1ce32c150d7acdabf059f71 /gdb | |
parent | 9095bf3b9db51eb471fbd760aef242a10603e54d (diff) | |
download | gdb-78655a10f7718f2596c0ae2a9a401e2597c5041f.zip gdb-78655a10f7718f2596c0ae2a9a401e2597c5041f.tar.gz gdb-78655a10f7718f2596c0ae2a9a401e2597c5041f.tar.bz2 |
Rearrange parser_state
This patch mildly rearranges parser_state, moving all the bool fields
together.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/parser-defs.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h index e92b480..39046d0 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<expr_completion_base> 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; |