aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h17
1 files changed, 11 insertions, 6 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 9e69998..3de14cc 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -366,9 +366,10 @@ protected:
// Unary prefix - or ! negation or NOT operators.
class NegationExpr : public OperatorExpr
{
-private:
+public:
using ExprType = NegationOperator;
+private:
/* Note: overload negation via std::ops::Neg and not via std::ops::Not
* Negation only works for signed integer and floating-point types, NOT only
* works for boolean and integer types (via bitwise NOT) */
@@ -408,9 +409,10 @@ protected:
// Infix binary operators. +, -, *, /, %, &, |, ^, <<, >>
class ArithmeticOrLogicalExpr : public OperatorExpr
{
-private:
+public:
using ExprType = ArithmeticOrLogicalOperator;
+private:
// Note: overloading trait specified in comments
ExprType expr_type;
@@ -483,9 +485,10 @@ protected:
// Infix binary comparison operators. ==, !=, <, <=, >, >=
class ComparisonExpr : public OperatorExpr
{
-private:
- using ExprType = ComparisionOperator;
+public:
+ using ExprType = ComparisonOperator;
+private:
// Note: overloading trait specified in comments
ExprType expr_type;
@@ -559,9 +562,10 @@ protected:
// Infix binary lazy boolean logical operators && and ||.
class LazyBooleanExpr : public OperatorExpr
{
-private:
+public:
using ExprType = LazyBooleanOperator;
+private:
ExprType expr_type;
std::unique_ptr<Expr> right_expr;
@@ -760,9 +764,10 @@ protected:
* expressions. */
class CompoundAssignmentExpr : public OperatorExpr
{
-private:
+public:
using ExprType = CompoundAssignmentOperator;
+private:
// Note: overloading trait specified in comments
ExprType expr_type;
std::unique_ptr<Expr> right_expr;