[sammy] support repeated params

Generate correct trees to refer to repeated params using `gen.paramToArg`.
Based on retronym's review feedback.