def Oper(klass, *kinds, **kwargs):
@action(Seq(*map(Loc, kinds)), loc=kwargs.get("<STR_LIT>", None))<EOL>def rule(parser, *tokens):<EOL><INDENT>return klass(loc=tokens[<NUM_LIT:0>].join(tokens[-<NUM_LIT:1>]))<EOL><DEDENT>return rule<EOL>
A rule that accepts a sequence of tokens of kinds ``kinds`` and returns
an instance of ``klass`` with ``loc`` encompassing the entire sequence
or None if the first token is not of ``kinds[0]``.