Documentation for method make

Documentation for method make, assembled from the following types:

class Match

From Match

(Match) method make

method make(Match:D: Mu $ast)
sub make(Mu $ast)

Sets the AST to $ast, and returns it.

This is just a little sugar for $/.made = $ast which is a very common operation in actions. $ast may be anything that makes sense for the use case. It's typically some tree node.

The sub form operates on the current $/, which can be a convenient shortcut:

method my-action ($/{
    make "foo: $/";
}