diff options
author | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-02 14:57:40 +0100 |
---|---|---|
committer | Andrew Burgess <andrew.burgess@embecosm.com> | 2020-06-23 13:34:11 +0100 |
commit | 1bf9c36374d9c758bc49dc18dca7acf0719e290d (patch) | |
tree | 698a8b65ddd1e853e3713a06385e2899b870e28c /gdb/language.h | |
parent | 87afa6523b01cd6bdcc3903fe22953966cec7bb7 (diff) | |
download | fsf-binutils-gdb-1bf9c36374d9c758bc49dc18dca7acf0719e290d.zip fsf-binutils-gdb-1bf9c36374d9c758bc49dc18dca7acf0719e290d.tar.gz fsf-binutils-gdb-1bf9c36374d9c758bc49dc18dca7acf0719e290d.tar.bz2 |
gdb: Convert language la_post_parser field to a method
This commit changes the language_data::la_post_parser function pointer
member variable into a member function of language_defn.
There should be no user visible changes after this commit.
gdb/ChangeLog:
* ada-lang.c (resolve): Rename to ada_language::post_parser.
(ada_language_data): Delete la_post_parser initializer.
(ada_language::post_parser): New member function.
* c-lang.c (c_language_data): Delete la_post_parser initializer.
(cplus_language_data): Likewise.
(asm_language_data): Likewise.
(minimal_language_data): Likewise.
* d-lang.c (d_language_data): Likewise.
* f-lang.c (f_language_data): Likewise.
* go-lang.c (go_language_data): Likewise.
* language.c (unknown_language_data): Likewise.
(auto_language_data): Likewise.
* language.h (language_data): Delete la_post_parser field.
(language_defn::post_parser): New member function.
* m2-lang.c (m2_language_data): Delete la_post_parser initializer.
* objc-lang.c (objc_language_data): Likewise.
* opencl-lang.c (opencl_language_data): Likewise.
* p-lang.c (pascal_language_data): Likewise.
* parse.c (parse_exp_in_context): Update call to post_parser.
(null_post_parser): Delete definition.
* parser-defs.h (null_post_parser): Delete declaration.
* rust-lang.c (rust_language_data): Delete la_post_parser
initializer.
Diffstat (limited to 'gdb/language.h')
-rw-r--r-- | gdb/language.h | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/gdb/language.h b/gdb/language.h index 7434d74..d5b106d 100644 --- a/gdb/language.h +++ b/gdb/language.h @@ -225,17 +225,6 @@ struct language_data const struct exp_descriptor *la_exp_desc; - /* Given an expression *EXPP created by prefixifying the result of - la_parser, perform any remaining processing necessary to complete - its translation. *EXPP may change; la_post_parser is responsible - for releasing its previous contents, if necessary. If - VOID_CONTEXT_P, then no value is expected from the expression. - If COMPLETING is non-zero, then the expression has been parsed - for completion, not evaluation. */ - - void (*la_post_parser) (expression_up *expp, int void_context_p, - int completing, innermost_block_tracker *tracker); - void (*la_printchar) (int ch, struct type *chtype, struct ui_file * stream); @@ -540,6 +529,21 @@ struct language_defn : language_data virtual int parser (struct parser_state *ps) const; + /* Given an expression *EXPP created by prefixifying the result of + la_parser, perform any remaining processing necessary to complete its + translation. *EXPP may change; la_post_parser is responsible for + releasing its previous contents, if necessary. If VOID_CONTEXT_P, + then no value is expected from the expression. If COMPLETING is + non-zero, then the expression has been parsed for completion, not + evaluation. */ + + virtual void post_parser (expression_up *expp, int void_context_p, + int completing, + innermost_block_tracker *tracker) const + { + /* By default the post-parser does nothing. */ + } + protected: /* This is the overridable part of the GET_SYMBOL_NAME_MATCHER method. |