public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-6183] gccrs: ast: dump: RangeExprs
@ 2023-02-21 11:57 Arthur Cohen
  0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2023-02-21 11:57 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:173f98ae49d816178d8fa5b627c62aade9547d04

commit r13-6183-g173f98ae49d816178d8fa5b627c62aade9547d04
Author: David Faust <david.faust@oracle.com>
Date:   Thu Oct 13 10:23:44 2022 -0700

    gccrs: ast: dump: RangeExprs
    
    gcc/rust/ChangeLog:
    
            * ast/rust-ast-dump.cc (Dump::visit): Add dump for RangeExprs.

Diff:
---
 gcc/rust/ast/rust-ast-dump.cc | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/gcc/rust/ast/rust-ast-dump.cc b/gcc/rust/ast/rust-ast-dump.cc
index b9e08b59554..8caad987538 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)

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-02-21 11:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-21 11:57 [gcc r13-6183] gccrs: ast: dump: RangeExprs Arthur Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).