From 35bdbbc61914d207beeb480db529d46bd4f9c771 Mon Sep 17 00:00:00 2001 From: Elizabeth Mattijsen Date: Sun, 17 Sep 2023 19:37:19 +0200 Subject: [PATCH] RakuAST: don't bother using especially named captures For the handling of if / with / elsif / orwith --- src/Raku/Actions.nqp | 4 ++-- src/Raku/Grammar.nqp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Raku/Actions.nqp b/src/Raku/Actions.nqp index 410a4154b02..9777c5fa342 100644 --- a/src/Raku/Actions.nqp +++ b/src/Raku/Actions.nqp @@ -702,8 +702,8 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions { for @*IF-PARTS { @elsifs.push: Nodify('Statement',$_).new: - condition => $[$index].ast, - then => $[$index].ast; + condition => $[$index].ast, + then => $[$index].ast; ++$index; } diff --git a/src/Raku/Grammar.nqp b/src/Raku/Grammar.nqp index 37e19ba53f0..9c1ef20a4cc 100644 --- a/src/Raku/Grammar.nqp +++ b/src/Raku/Grammar.nqp @@ -1295,13 +1295,13 @@ grammar Raku::Grammar is HLL::Grammar does Raku::Common { {} :my $*GOAL := '{'; :my $*BORG := {}; - # initial condition - # initial body - [ # any elsifs/orwiths + # initial condition + # initial body + [ # any elsifs/orwiths [ | [<.block-elsif>|<.block-orwith>] - - + + | $=[<.block-else>\h*<.block-if>|elif] <.malformed: ~$, 'Elsif'>