Introduce ada_string_operation
[deliverable/binutils-gdb.git] / gdb / ada-exp.h
CommitLineData
03070ee9
TT
1/* Definitions for Ada expressions
2
3 Copyright (C) 2020 Free Software Foundation, Inc.
4
5 This file is part of GDB.
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
19
20#ifndef ADA_EXP_H
21#define ADA_EXP_H
22
23#include "expop.h"
24
25namespace expr
26{
27
28/* In Ada, some generic operations must be wrapped with a handler that
29 handles some Ada-specific type conversions. */
30class ada_wrapped_operation
31 : public tuple_holding_operation<operation_up>
32{
33public:
34
35 using tuple_holding_operation::tuple_holding_operation;
36
37 value *evaluate (struct type *expect_type,
38 struct expression *exp,
39 enum noside noside) override;
40
41 enum exp_opcode opcode () const override
42 { return std::get<0> (m_storage)->opcode (); }
43};
44
42fecb61
TT
45/* An Ada string constant. */
46class ada_string_operation
47 : public string_operation
48{
49public:
50
51 using string_operation::string_operation;
52
53 value *evaluate (struct type *expect_type,
54 struct expression *exp,
55 enum noside noside) override;
56};
57
03070ee9
TT
58} /* namespace expr */
59
60#endif /* ADA_EXP_H */
This page took 0.027651 seconds and 4 git commands to generate.