diff options
author | David Faust <david.faust@oracle.com> | 2022-10-13 10:23:44 -0700 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:34 +0100 |
commit | 173f98ae49d816178d8fa5b627c62aade9547d04 (patch) | |
tree | 76294b958496380e84affec07073551d70777fa2 /gcc | |
parent | d1db46191ea5f3ef44833c21f7680f67e4701f7f (diff) | |
download | gcc-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')
-rw-r--r-- | gcc/rust/ast/rust-ast-dump.cc | 31 |
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) |