aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast-dump.cc
diff options
context:
space:
mode:
authorDavid Faust <david.faust@oracle.com>2022-10-13 10:23:44 -0700
committerArthur Cohen <arthur.cohen@embecosm.com>2023-02-21 12:36:34 +0100
commit173f98ae49d816178d8fa5b627c62aade9547d04 (patch)
tree76294b958496380e84affec07073551d70777fa2 /gcc/rust/ast/rust-ast-dump.cc
parentd1db46191ea5f3ef44833c21f7680f67e4701f7f (diff)
downloadgcc-173f98ae49d816178d8fa5b627c62aade9547d04.zip
gcc-173f98ae49d816178d8fa5b627c62aade9547d04.tar.gz
gcc-173f98ae49d816178d8fa5b627c62aade9547d04.tar.bz2
gccrs: ast: dump: RangeExprs
gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add dump for RangeExprs.
Diffstat (limited to 'gcc/rust/ast/rust-ast-dump.cc')
-rw-r--r--gcc/rust/ast/rust-ast-dump.cc31
1 files changed, 25 insertions, 6 deletions
diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index b9e08b5..8caad98 100644
--- a/gcc/rust/ast/rust-ast-dump.cc
+++ b/gcc/rust/ast/rust-ast-dump.cc
@@ -622,27 +622,46 @@ Dump::visit (BreakExpr &expr)
void
Dump::visit (RangeFromToExpr &expr)
-{}
+{
+ expr.get_from_expr ()->accept_vis (*this);
+ stream << "..";
+ expr.get_to_expr ()->accept_vis (*this);
+}
void
Dump::visit (RangeFromExpr &expr)
-{}
+{
+ expr.get_from_expr ()->accept_vis (*this);
+ stream << "..";
+}
void
Dump::visit (RangeToExpr &expr)
-{}
+{
+ stream << "..";
+ expr.get_to_expr ()->accept_vis (*this);
+}
void
Dump::visit (RangeFullExpr &expr)
-{}
+{
+ stream << "..";
+}
void
Dump::visit (RangeFromToInclExpr &expr)
-{}
+{
+ expr.get_from_expr ()->accept_vis (*this);
+ stream << "..=";
+ expr.get_to_expr ()->accept_vis (*this);
+}
void
Dump::visit (RangeToInclExpr &expr)
-{}
+{
+ stream << "..=";
+ expr.get_to_expr ()->accept_vis (*this);
+}
void
Dump::visit (ReturnExpr &expr)