code: def expect(parser, kind):
      # type: (Parser, int) -> Token
      
      token = parser.token
      if token.kind == kind:
          advance(parser)
          return token
  
      raise GraphQLSyntaxError(
          parser.source,
          token.start,
          u"Expected {}, found {}".format(
              get_token_kind_desc(kind), get_token_desc(token)
          ),
      )
docs: If the next token is of the given kind, return that token after
      advancing the parser. Otherwise, do not change the parser state and
      return False.