class H::Actions { # construct a hash from a list of pairs method TOP($/) { make %($.ast); } # construct a list of Str => Match pairs method pairs($/){ make @($».ast) } # construct a Str => Match pair method pair($/) { make ~$ => $ }; } #### my @a = @($/) make %( @a».».Str Z=> @a». )