code: def Loc(kind, loc=None):
      
      @llrule(loc, lambda parser: [kind])
      def rule(parser):
          result = parser._accept(kind)
          if result is unmatched:
              return result
          return result.loc
      return rule
docs: A rule that accepts a token of kind ``kind`` and returns its location, or returns None.