src/basilisp/lang/reader.py
def _read_reader_macro(ctx: ReaderContext) -> LispReaderForm:
    """Return a data structure evaluated as a reader
    macro from the input stream."""
    start = ctx.reader.advance()
    assert start == "#"
    token = ctx.reader.peek()
    if token == "{":
        return _read_set(ctx)
    elif token == "(":
        return _read_function(ctx)
    elif token == "'":
        ctx.reader.advance()
        s = _read_sym(ctx)
        return llist.l(_VAR, s)
    elif token == '"':
        return _read_regex(ctx)
    elif token == "_":
        ctx.reader.advance()
        _read_next(ctx)  # Ignore the entire next form
        return COMMENT
    elif ns_name_chars.match(token):
        s = _read_sym(ctx)
        assert isinstance(s, symbol.Symbol)
        v = _read_next_consuming_comment(ctx)
        if s in ctx.data_readers:
            f = ctx.data_readers[s]
            return f(v)
        else:
            raise SyntaxError(f"No data reader found for tag #{s}")

    raise SyntaxError(f"Unexpected token '{token}' in reader macro")
def _read_reader_macro(ctx: ReaderContext) -> LispReaderForm:
    start = ctx.reader.advance()
    assert start == "#"
    token = ctx.reader.peek()
    if token == "{":
        return _read_set(ctx)
    elif token == "(":
        return _read_function(ctx)
    elif token == "'":
        ctx.reader.advance()
        s = _read_sym(ctx)
        return llist.l(_VAR, s)
    elif token == '"':
        return _read_regex(ctx)
    elif token == "_":
        ctx.reader.advance()
        _read_next(ctx)  # Ignore the entire next form
        return COMMENT
    elif ns_name_chars.match(token):
        s = _read_sym(ctx)
        assert isinstance(s, symbol.Symbol)
        v = _read_next_consuming_comment(ctx)
        if s in ctx.data_readers:
            f = ctx.data_readers[s]
            return f(v)
        else:
            raise SyntaxError(f"No data reader found for tag #{s}")

    raise SyntaxError(f"Unexpected token '{token}' in reader macro")
def _read_reader_macro ( ctx : ReaderContext ) -> LispReaderForm : start = ctx . reader . advance ( ) assert start == "#" token = ctx . reader . peek ( ) if token == "{" : return _read_set ( ctx ) elif token == "(" : return _read_function ( ctx ) elif token == "'" : ctx . reader . advance ( ) s = _read_sym ( ctx ) return llist . l ( _VAR , s ) elif token == '"' : return _read_regex ( ctx ) elif token == "_" : ctx . reader . advance ( ) _read_next ( ctx ) # Ignore the entire next form return COMMENT elif ns_name_chars . match ( token ) : s = _read_sym ( ctx ) assert isinstance ( s , symbol . Symbol ) v = _read_next_consuming_comment ( ctx ) if s in ctx . data_readers : f = ctx . data_readers [ s ] return f ( v ) else : raise SyntaxError ( f"No data reader found for tag #{s}" ) raise SyntaxError ( f"Unexpected token '{token}' in reader macro" )
Return a data structure evaluated as a reader
    macro from the input stream.
Return a data structure evaluated as a reader macro from the input stream .