diff options
author | Tom Tromey <tom@tromey.com> | 2021-03-08 07:27:57 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2021-03-08 07:28:32 -0700 |
commit | 73796c73263da16cedbefd5a43ab7e1887836115 (patch) | |
tree | c6d74fd8ea50be3c5f5643c26dc518d802c2f511 /gdb/ada-exp.h | |
parent | cd9a314824b2b87207a8ba7a8003639989d2406b (diff) | |
download | gdb-73796c73263da16cedbefd5a43ab7e1887836115.zip gdb-73796c73263da16cedbefd5a43ab7e1887836115.tar.gz gdb-73796c73263da16cedbefd5a43ab7e1887836115.tar.bz2 |
Introduce ada_binop_addsub_operation
This adds class ada_binop_addsub_operation, which implements the Ada +
and - operators.
gdb/ChangeLog
2021-03-08 Tom Tromey <tom@tromey.com>
* ada-lang.c (ada_binop_addsub_operation::evaluate): New method.
* ada-exp.h (class ada_binop_addsub_operation): New.
Diffstat (limited to 'gdb/ada-exp.h')
-rw-r--r-- | gdb/ada-exp.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h index de69210..ad69d93 100644 --- a/gdb/ada-exp.h +++ b/gdb/ada-exp.h @@ -134,6 +134,22 @@ public: { return UNOP_IN_RANGE; } }; +/* The Ada + and - operators. */ +class ada_binop_addsub_operation + : public tuple_holding_operation<enum exp_opcode, operation_up, operation_up> +{ +public: + + using tuple_holding_operation::tuple_holding_operation; + + value *evaluate (struct type *expect_type, + struct expression *exp, + enum noside noside) override; + + enum exp_opcode opcode () const override + { return std::get<0> (m_storage); } +}; + } /* namespace expr */ #endif /* ADA_EXP_H */ |