aboutsummaryrefslogtreecommitdiff
path: root/gdb/parser-defs.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-04-28 08:23:00 -0600
committerTom Tromey <tromey@adacore.com>2023-05-23 13:57:54 -0600
commitb5688cda0ec49822b29cecab9d08460bbf3b1a02 (patch)
tree0823dfe729d46164bf1e45a24c65360cc7f476af /gdb/parser-defs.h
parentb8c03634d6537ee7ad068ab840b6e78483aaca80 (diff)
downloadgdb-b5688cda0ec49822b29cecab9d08460bbf3b1a02.zip
gdb-b5688cda0ec49822b29cecab9d08460bbf3b1a02.tar.gz
gdb-b5688cda0ec49822b29cecab9d08460bbf3b1a02.tar.bz2
Simplify parser_state constructor
This simplifies the parser_state constructor by having it accept a parser_flags parameter.
Diffstat (limited to 'gdb/parser-defs.h')
-rw-r--r--gdb/parser-defs.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/gdb/parser-defs.h b/gdb/parser-defs.h
index 5c6bc22..2a246ff 100644
--- a/gdb/parser-defs.h
+++ b/gdb/parser-defs.h
@@ -146,19 +146,18 @@ struct parser_state : public expr_builder
struct gdbarch *gdbarch,
const struct block *context_block,
CORE_ADDR context_pc,
- int comma,
+ parser_flags flags,
const char *input,
bool completion,
- innermost_block_tracker *tracker,
- bool void_p)
+ innermost_block_tracker *tracker)
: expr_builder (lang, gdbarch),
expression_context_block (context_block),
expression_context_pc (context_pc),
- comma_terminates (comma),
+ comma_terminates ((flags & PARSER_COMMA_TERMINATES) != 0),
lexptr (input),
parse_completion (completion),
block_tracker (tracker),
- void_context_p (void_p)
+ void_context_p ((flags & PARSER_VOID_CONTEXT) != 0)
{
}