From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by sourceware.org (Postfix) with ESMTPS id 13F77384FB6B for ; Tue, 21 Feb 2023 12:03:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 13F77384FB6B Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42a.google.com with SMTP id t15so4267252wrz.7 for ; Tue, 21 Feb 2023 04:03:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=hOqfwE3wkTzoLZ4O/E/DEsRHNpWnm2k7Dz+yLnaoaTY=; b=DjVRMe+lFzJRs8PclEZ9svHmnqiWIZZn6WrcOtegwohdKcvxop/uUw/68ynTx9j1MY ge0QmkDpEiIrKCngu4RbHqeGArp4a6KthYsSmdaZ36oFOe/Xa5bjx8Mvz9DD5jFGrOhq rwBOUByhfiXDeJT6M4/em7KHDolkaSU7Mkdhu5ZVms+T/F86SsEzhYl22h1xbYJEm/XJ ITFB/M0/TRRmrTJx5apeaPRJdD9qPh1XLsrDVaX3zWML50ZuQVU92qicyKviObo/Yj5J wXqQv1YGpudneEBFDMvEP2LjT+4mVSIldgO5jhxBA2ot+uirfnUxQQU/yehnD5pJqXIy Djvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=hOqfwE3wkTzoLZ4O/E/DEsRHNpWnm2k7Dz+yLnaoaTY=; b=mh3KpaoPr2MHUCimlCso0BpeDbpcLmUdZsTSrnYdYBE/R3BnSrCzGPIdH2tSqer3Y3 1/WLMx9eejaeeUn7i2OQTeAuqoWS/5PHRk+LeGx6gxWSAK36knieD+iCNwVJbARYf35k gdooUPWXWPWDGqi3P4zQ6n87MsZ3p8RFn4awBTCNL4G9/utmlRT9EQkTRp8aaGyww4fz 6pvOvYyn/UEaAhvSTDQsJ9znLbAyNL1VdpQxnDKiOk4nLdG2DfQkupGFM4K6CTbdcXh/ 6bIVfyuAkmNe191scXv2EwCxwxVSsJ+2MQcioSR4cjOAeXmY3TgoL4IZZpq6aFMjJeMD kA6A== X-Gm-Message-State: AO0yUKUTXVCYJ5P6ULzn1jzFnclGS+mKkHxDPq8t9VOKKcguPNL4K3zG Kq8rXCWncUVxWAEpW8vMeFT9ldLueprV1oeA+g== X-Google-Smtp-Source: AK7set8UvHZ7bijaCr0rEaIqCIho5XI5swkq8VVonjnTIRV2zCr26e6NIKV9xc1GAl0UyUlVOW60VA== X-Received: by 2002:a5d:5511:0:b0:2c3:e7d8:245c with SMTP id b17-20020a5d5511000000b002c3e7d8245cmr3052626wrv.13.1676981027409; Tue, 21 Feb 2023 04:03:47 -0800 (PST) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c15-20020adffb4f000000b002c55b0e6ef1sm5013811wrs.4.2023.02.21.04.03.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Feb 2023 04:03:46 -0800 (PST) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, David Faust Subject: [committed 030/103] gccrs: ast: dump: RangeExprs Date: Tue, 21 Feb 2023 13:01:20 +0100 Message-Id: <20230221120230.596966-31-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230221120230.596966-1-arthur.cohen@embecosm.com> References: <20230221120230.596966-1-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-15.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: David Faust gcc/rust/ChangeLog: * ast/rust-ast-dump.cc (Dump::visit): Add dump for RangeExprs. --- 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) -- 2.39.1