public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Rearrange parser_state
@ 2023-05-23 20:18 Tom Tromey
0 siblings, 0 replies; only message in thread
From: Tom Tromey @ 2023-05-23 20:18 UTC (permalink / raw)
To: gdb-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=78655a10f7718f2596c0ae2a9a401e2597c5041f
commit 78655a10f7718f2596c0ae2a9a401e2597c5041f
Author: Tom Tromey <tromey@adacore.com>
Date: Fri Apr 28 08:25:00 2023 -0600
Rearrange parser_state
This patch mildly rearranges parser_state, moving all the bool fields
together.
Diff:
---
gdb/parser-defs.h | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
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<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;
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-05-23 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-23 20:18 [binutils-gdb] Rearrange parser_state Tom Tromey
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).