src/basilisp/lang/reader.py
def _read_coll(
    ctx: ReaderContext,
    f: Callable[[Collection[Any]], Union[llist.List, lset.Set, vector.Vector]],
    end_token: str,
    coll_name: str,
):
    """Read a collection from the input stream and create the
    collection using f."""
    coll: List = []
    reader = ctx.reader
    while True:
        token = reader.peek()
        if token == "":
            raise SyntaxError(f"Unexpected EOF in {coll_name}")
        if whitespace_chars.match(token):
            reader.advance()
            continue
        if token == end_token:
            reader.next_token()
            return f(coll)
        elem = _read_next(ctx)
        if elem is COMMENT:
            continue
        coll.append(elem)
def _read_coll(
    ctx: ReaderContext,
    f: Callable[[Collection[Any]], Union[llist.List, lset.Set, vector.Vector]],
    end_token: str,
    coll_name: str,
):
    coll: List = []
    reader = ctx.reader
    while True:
        token = reader.peek()
        if token == "":
            raise SyntaxError(f"Unexpected EOF in {coll_name}")
        if whitespace_chars.match(token):
            reader.advance()
            continue
        if token == end_token:
            reader.next_token()
            return f(coll)
        elem = _read_next(ctx)
        if elem is COMMENT:
            continue
        coll.append(elem)
def _read_coll ( ctx : ReaderContext , f : Callable [ [ Collection [ Any ] ] , Union [ llist . List , lset . Set , vector . Vector ] ] , end_token : str , coll_name : str , ) : coll : List = [ ] reader = ctx . reader while True : token = reader . peek ( ) if token == "" : raise SyntaxError ( f"Unexpected EOF in {coll_name}" ) if whitespace_chars . match ( token ) : reader . advance ( ) continue if token == end_token : reader . next_token ( ) return f ( coll ) elem = _read_next ( ctx ) if elem is COMMENT : continue coll . append ( elem )
Read a collection from the input stream and create the
    collection using f.
Read a collection from the input stream and create the collection using f .