using namespace expr;
-#if WORDS_BIGENDIAN
-#define UTF32 "UTF-32BE"
-#else
-#define UTF32 "UTF-32LE"
-#endif
-
/* A regular expression for matching Rust numbers. This is split up
since it is very long and this gives us a way to comment the
sections. */
operation_up parse_entry_point ()
{
lex ();
- return parse_expr ();
+ operation_up result = parse_expr ();
+ if (current_token != 0)
+ error (_("Syntax error near '%s'"), pstate->prev_lexptr);
+ return result;
}
operation_up parse_tuple ();
if (result.symbol != NULL)
{
update_innermost_block (result);
- return SYMBOL_TYPE (result.symbol);
+ return result.symbol->type ();
}
type = lookup_typename (language (), name, NULL, 1);
return 0;
auto_obstack result;
- convert_between_encodings (host_charset (), UTF32, (const gdb_byte *) text,
+ convert_between_encodings (host_charset (), HOST_UTF32,
+ (const gdb_byte *) text,
quote, 1, &result, translit_none);
int size = obstack_object_size (&result);
if (is_byte)
obstack_1grow (&obstack, value);
else
- convert_between_encodings (UTF32, "UTF-8", (gdb_byte *) &value,
+ convert_between_encodings (HOST_UTF32, "UTF-8",
+ (gdb_byte *) &value,
sizeof (value), sizeof (value),
&obstack, translit_none);
}
struct block_symbol sym = lookup_symbol (name.c_str (),
pstate->expression_context_block,
VAR_DOMAIN);
- if (sym.symbol != nullptr && SYMBOL_CLASS (sym.symbol) != LOC_TYPEDEF)
+ if (sym.symbol != nullptr && sym.symbol->aclass () != LOC_TYPEDEF)
return make_operation<var_value_operation> (sym);
struct type *type = nullptr;
if (sym.symbol != nullptr)
{
- gdb_assert (SYMBOL_CLASS (sym.symbol) == LOC_TYPEDEF);
- type = SYMBOL_TYPE (sym.symbol);
+ gdb_assert (sym.symbol->aclass () == LOC_TYPEDEF);
+ type = sym.symbol->type ();
}
if (type == nullptr)
type = rust_lookup_type (name.c_str ());
case STRING:
result = parse_string ();
+ lex ();
break;
case BYTESTRING: