From 73923d7eedc7ab52144308ef7e9c12cbe4341bca Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 24 Mar 2019 09:01:18 -0600 Subject: Turn parse_language into a method This changes parse_language into a method of parser_state. This patch was written by a script. gdb/ChangeLog 2019-04-04 Tom Tromey * rust-exp.y: Replace "parse_language" with method call. * p-exp.y: (yylex): Replace "parse_language" with method call. * m2-exp.y: (yylex): Replace "parse_language" with method call. * go-exp.y (classify_name): Replace "parse_language" with method call. * f-exp.y (yylex): Replace "parse_language" with method call. * d-exp.y (lex_one_token): Replace "parse_language" with method call. * c-exp.y: (lex_one_token, classify_name, yylex): Replace "parse_language" with method call. * ada-exp.y (find_primitive_type, type_char) (type_system_address): Replace "parse_language" with method call. --- gdb/m2-exp.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/m2-exp.y') diff --git a/gdb/m2-exp.y b/gdb/m2-exp.y index c78e03f..611981f 100644 --- a/gdb/m2-exp.y +++ b/gdb/m2-exp.y @@ -596,7 +596,7 @@ variable: NAME type : TYPENAME - { $$ = lookup_typename (parse_language (pstate), + { $$ = lookup_typename (pstate->language (), pstate->gdbarch (), copy_name ($1), expression_context_block, 0); } @@ -968,7 +968,7 @@ yylex (void) sym = lookup_symbol (tmp, expression_context_block, VAR_DOMAIN, 0).symbol; if (sym && SYMBOL_CLASS (sym) == LOC_BLOCK) return BLOCKNAME; - if (lookup_typename (parse_language (pstate), pstate->gdbarch (), + if (lookup_typename (pstate->language (), pstate->gdbarch (), copy_name (yylval.sval), expression_context_block, 1)) return TYPENAME; -- cgit v1.1