Skip to content

Commit

Permalink
RakuAST: small tweak in term:sym<name> handling
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Oct 2, 2023
1 parent 9be9c24 commit c814416
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/Raku/Actions.nqp
Original file line number Diff line number Diff line change
Expand Up @@ -1622,15 +1622,15 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {
method term:sym<name>($/) {
my $name := $<longname>.ast;
if $<args> {
my $ast := $<args>.ast;
self.attach: $/, $ast.invocant
my $args := $<args>.ast;
self.attach: $/, (my $invocant := $args.invocant)
# Indirect method call syntax, e.g. new Int: 1
?? Nodify('ApplyPostfix').new(
operand => $ast.invocant,
postfix => Nodify('Call','Method').new(:$name, :args($ast))
operand => $invocant,
postfix => Nodify('Call','Method').new(:$name, :$args)
)
# Normal named method call
!! Nodify('Call','Name').new(:$name, :args($ast))
!! Nodify('Call','Name').new(:$name, :$args)
}
else {
self.attach: $/, $*IS-TYPE
Expand Down

0 comments on commit c814416

Please sign in to comment.