src/basilisp/lang/reader.py
def _with_loc(f: W) -> W:
    """Wrap a reader function in a decorator to supply line and column
    information along with relevant forms."""

    @functools.wraps(f)
    def with_lineno_and_col(ctx):
        meta = lmap.map(
            {READER_LINE_KW: ctx.reader.line, READER_COL_KW: ctx.reader.col}
        )
        v = f(ctx)
        try:
            return v.with_meta(meta)  # type: ignore
        except AttributeError:
            return v

    return cast(W, with_lineno_and_col)
def _with_loc(f: W) -> W:
    @functools.wraps(f)
    def with_lineno_and_col(ctx):
        meta = lmap.map(
            {READER_LINE_KW: ctx.reader.line, READER_COL_KW: ctx.reader.col}
        )
        v = f(ctx)
        try:
            return v.with_meta(meta)  # type: ignore
        except AttributeError:
            return v

    return cast(W, with_lineno_and_col)
def _with_loc ( f : W ) -> W : @ functools . wraps ( f ) def with_lineno_and_col ( ctx ) : meta = lmap . map ( { READER_LINE_KW : ctx . reader . line , READER_COL_KW : ctx . reader . col } ) v = f ( ctx ) try : return v . with_meta ( meta ) # type: ignore except AttributeError : return v return cast ( W , with_lineno_and_col )
Wrap a reader function in a decorator to supply line and column
    information along with relevant forms.
Wrap a reader function in a decorator to supply line and column information along with relevant forms .