aboutsummaryrefslogtreecommitdiff
path: root/gdb/ada-exp.h
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2021-03-08 07:27:57 -0700
committerTom Tromey <tom@tromey.com>2021-03-08 07:28:26 -0700
commitfc715eb288a8f364616c7adc16afd8ba74849d62 (patch)
treea4fbc6640000e82c3e63d66ccb712480d9d1ef48 /gdb/ada-exp.h
parentcc6bd32eeac6b31b036a172b6841d699e05b285f (diff)
downloadgdb-fc715eb288a8f364616c7adc16afd8ba74849d62.zip
gdb-fc715eb288a8f364616c7adc16afd8ba74849d62.tar.gz
gdb-fc715eb288a8f364616c7adc16afd8ba74849d62.tar.bz2
Introduce ada_ternop_range_operation
This adds class ada_ternop_range_operation, which implements TERNOP_IN_RANGE. gdb/ChangeLog 2021-03-08 Tom Tromey <tom@tromey.com> * ada-lang.c (ada_ternop_range_operation::evaluate): New method. * ada-exp.h (class ada_ternop_range_operation): New.
Diffstat (limited to 'gdb/ada-exp.h')
-rw-r--r--gdb/ada-exp.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/ada-exp.h b/gdb/ada-exp.h
index 9a8c8df..17a04ea 100644
--- a/gdb/ada-exp.h
+++ b/gdb/ada-exp.h
@@ -71,6 +71,22 @@ public:
{ return UNOP_QUAL; }
};
+/* Ternary in-range operator. */
+class ada_ternop_range_operation
+ : public tuple_holding_operation<operation_up, 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 TERNOP_IN_RANGE; }
+};
+
} /* namespace expr */
#endif /* ADA_EXP_H */