'The \'match\' primitive of RD parsers.
* Verifies that the current token is of the given kind (kind can
be a tuple, in which the kind must match one of its members).
* Returns the value of the current token
* Reads in the next token'

def _match(self, kind):

    if ((isinstance(kind, tuple) and (self.cur_token.kind in kind)) or (self.cur_token.kind == kind)):
        value = self.cur_token.value
        self._advance()
        return value
    else:
        raise ASDLSyntaxError('Unmatched    {}    (found    {})'.format(kind, self.cur_token.kind), self.cur_token.lineno)
