diff --git a/src/Raku/Actions.nqp b/src/Raku/Actions.nqp index fb5cb160c9d..db598e41b54 100644 --- a/src/Raku/Actions.nqp +++ b/src/Raku/Actions.nqp @@ -783,9 +783,15 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions { make $/[0].ast; } else { - self.attach: $/, self.r('ApplyPostfix').new: - postfix => $ast // self.r('Postfix').new($), - operand => $/[0].ast; + if nqp::istype($ast, self.r('Call', 'Name')) { + $ast.args.push: $/[0].ast; + self.attach: $/, $ast; + } + else { + self.attach: $/, self.r('ApplyPostfix').new: + postfix => $ast // self.r('Postfix').new($), + operand => $/[0].ast; + } } } else { @@ -903,6 +909,26 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions { elsif $ { self.attach: $/, $.ast; } + elsif $ { + if $ eq "" && $ -> $cf { + if $cf -> $op_name { + self.attach: $/, self.r('Call', 'Name').new( + :name( + self.r('Name').from-identifier( + 'prefix:' ~ self.r('ColonPairish').IMPL-QUOTE-VALUE( + ($op_name // $op_name // $op_name).Str + ) + ) + ) + ); + } + else { + nqp::die('NYI kind of dottyop with coloncircumfix'); + } + } else { + self.attach: $/, $.ast; + } + } else { nqp::die('NYI kind of dottyop'); } diff --git a/src/Raku/Grammar.nqp b/src/Raku/Grammar.nqp index 18c09519d8e..7e868f83ef6 100644 --- a/src/Raku/Grammar.nqp +++ b/src/Raku/Grammar.nqp @@ -1263,7 +1263,7 @@ grammar Raku::Grammar is HLL::Grammar does Raku::Common { <.unsp>? [ | -# | + | | $ = {$} $ = {$} <.dotty-non-ident($special)> ] diff --git a/src/Raku/ast/call.rakumod b/src/Raku/ast/call.rakumod index afe7c408c1f..bf3b65a8da7 100644 --- a/src/Raku/ast/call.rakumod +++ b/src/Raku/ast/call.rakumod @@ -26,6 +26,8 @@ class RakuAST::ArgList $obj } + method push($arg) { nqp::push($!args, $arg) } + method has-args() { nqp::elems($!args) } method args() {