Ticket #294: reader.diff

File reader.diff, 1.1 KB (added by stassats, 11 years ago)
  • Stream.java

     
    739739    private static final boolean isTokenDelimiter(char c, Readtable rt)
    740740
    741741    {
    742         switch (c) {
    743         case '"':
    744         case '\'':
    745         case '(':
    746         case ')':
    747         case ',':
    748         case ';':
    749         case '`':
    750             return true;
    751         default:
    752             return rt.isWhitespace(c);
    753         }
     742        byte type = rt.getSyntaxType(c);
     743
     744        return type == Readtable.SYNTAX_TYPE_TERMINATING_MACRO ||
     745                type == Readtable.SYNTAX_TYPE_WHITESPACE;
     746       
    754747    }
    755748
    756749    public LispObject readDispatchChar(char dispChar,
     
    909902                c = (char) n; // ### BUG: Codepoint conversion
    910903                if (rt.isWhitespace(c))
    911904                    break;
    912                 if (c == '(' || c == ')') {
     905                if (rt.getSyntaxType(c) ==
     906                    Readtable.SYNTAX_TYPE_TERMINATING_MACRO) {
    913907                    _unreadChar(c);
    914908                    break;
    915909                }