/* YACC parser for D expressions, for GDB.
- Copyright (C) 2014-2016 Free Software Foundation, Inc.
+ Copyright (C) 2014-2017 Free Software Foundation, Inc.
This file is part of GDB.
CastExpression:
CAST_KEYWORD '(' TypeExp ')' UnaryExpression
- { write_exp_elt_opcode (pstate, UNOP_CAST);
- write_exp_elt_type (pstate, $3);
- write_exp_elt_opcode (pstate, UNOP_CAST); }
+ { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
/* C style cast is illegal D, but is still recognised in
the grammar, so we keep this around for convenience. */
| '(' TypeExp ')' UnaryExpression
- { write_exp_elt_opcode (pstate, UNOP_CAST);
- write_exp_elt_type (pstate, $2);
- write_exp_elt_opcode (pstate, UNOP_CAST); }
+ { write_exp_elt_opcode (pstate, UNOP_CAST_TYPE); }
+
;
PowExpression:
{
return (TYPE_CODE (type) == TYPE_CODE_STRUCT
|| TYPE_CODE (type) == TYPE_CODE_UNION
+ || TYPE_CODE (type) == TYPE_CODE_MODULE
|| (TYPE_CODE (type) == TYPE_CODE_ENUM
&& TYPE_DECLARED_CLASS (type)));
}
if (parsed_float)
{
- const struct builtin_d_type *builtin_d_types;
const char *suffix;
int suffix_len;
char *s, *sp;