const struct rust_op *
rust_parser::crate_name (const struct rust_op *name)
{
- std::string crate = rust_crate_for_block (expression_context_block);
+ std::string crate = rust_crate_for_block (pstate->expression_context_block);
struct stoken result;
gdb_assert (name->opcode == OP_VAR_VALUE);
const struct rust_op *
rust_parser::super_name (const struct rust_op *ident, unsigned int n_supers)
{
- const char *scope = block_scope (expression_context_block);
+ const char *scope = block_scope (pstate->expression_context_block);
int offset;
gdb_assert (ident->opcode == OP_VAR_VALUE);
{
const char *varname = convert_name (operation);
- result = rust_lookup_type (varname, expression_context_block);
+ result = rust_lookup_type (varname, pstate->expression_context_block);
if (result == NULL)
error (_("No typed name '%s' in current context"), varname);
return result;
/* We don't allow creating new tuple types (yet), but we do
allow looking up existing tuple types. */
- result = rust_lookup_type (name, expression_context_block);
+ result = rust_lookup_type (name, pstate->expression_context_block);
if (result == NULL)
error (_("could not find tuple type '%s'"), name);
}
struct type *type;
const char *varname = convert_name (operation->left.op);
- type = rust_lookup_type (varname, expression_context_block);
+ type = rust_lookup_type (varname,
+ pstate->expression_context_block);
if (type != NULL)
{
/* This is actually a tuple struct expression, not a
}
varname = convert_name (operation);
- sym = rust_lookup_symbol (varname, expression_context_block,
+ sym = rust_lookup_symbol (varname, pstate->expression_context_block,
VAR_DOMAIN);
if (sym.symbol != NULL && SYMBOL_CLASS (sym.symbol) != LOC_TYPEDEF)
{
type = SYMBOL_TYPE (sym.symbol);
}
if (type == NULL)
- type = rust_lookup_type (varname, expression_context_block);
+ type = rust_lookup_type (varname,
+ pstate->expression_context_block);
if (type == NULL)
error (_("No symbol '%s' in current context"), varname);
}
name = convert_name (operation->left.op);
- type = rust_lookup_type (name, expression_context_block);
+ type = rust_lookup_type (name, pstate->expression_context_block);
if (type == NULL)
error (_("Could not find type '%s'"), operation->left.sval.ptr);
int i;
// Set up dummy "parser", so that rust_type works.
- struct parser_state ps (&rust_language_defn, target_gdbarch ());
+ struct parser_state ps (&rust_language_defn, target_gdbarch (),
+ nullptr, 0);
rust_parser parser (&ps);
rust_lex_test_one (&parser, "", 0);