Changeset 13508 for trunk/abcl/src/org


Ignore:
Timestamp:
08/16/11 09:49:25 (10 years ago)
Author:
Mark Evenson
Message:

Fix #148: READTABLE-CASE :invert doesn't work for symbols.

A slightly modified version of the patch provided by Ole Arnedt with a
test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/Stream.java

    r13461 r13508  
    546546        final Readtable rt =
    547547            (Readtable) Symbol.CURRENT_READTABLE.symbolValue(LispThread.currentThread());
    548         StringBuilder sb = new StringBuilder();
    549         _readToken(sb, rt);
    550         return new Symbol(sb.toString());
     548        return readSymbol(rt);
    551549    }
    552550
    553551    public LispObject readSymbol(Readtable rt) {
    554         StringBuilder sb = new StringBuilder();
    555         _readToken(sb, rt);
    556         return new Symbol(sb.toString());
     552        final StringBuilder sb = new StringBuilder();
     553        final BitSet flags = _readToken(sb, rt);
     554        return new Symbol(rt.getReadtableCase() == Keyword.INVERT
     555                          ? invert(sb.toString(), flags)
     556                          : sb.toString());
    557557    }
    558558
Note: See TracChangeset for help on using the changeset viewer.