Changeset 8481


Ignore:
Timestamp:
02/06/05 01:36:17 (17 years ago)
Author:
piso
Message:

readList() => readList(boolean requireProper)

File:
1 edited

Legend:

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

    r8480 r8481  
    33 *
    44 * Copyright (C) 2003-2005 Peter Graves
    5  * $Id: Stream.java,v 1.110 2005-02-06 01:15:56 piso Exp $
     5 * $Id: Stream.java,v 1.111 2005-02-06 01:36:17 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    340340    }
    341341
    342     public LispObject readList() throws ConditionThrowable
     342    public LispObject readList(boolean requireProper) throws ConditionThrowable
    343343    {
    344344        Cons first = null;
     
    362362                    }
    363363                    LispObject obj = read(true, NIL, true);
     364                    if (requireProper) {
     365                        if (!obj.listp())
     366                            signal(new ReaderError("The value " +
     367                                                   obj.writeToString() +
     368                                                   " is not of type LIST."));
     369                    }
    364370                    last.setCdr(obj);
    365371                    continue;
Note: See TracChangeset for help on using the changeset viewer.