public static List<Var> buildVarList(ItemList list) { if ( list.size() > 0 && list.getFirst().isSymbol(Tags.tagVars) ) list = list.cdr() ; List<Var> vars = new ArrayList<Var>() ; for (Item x : list) { Var v = buildVar(x) ; vars.add(v) ; } return vars ; }
@Override protected void declItem(ItemList list, Item item) { if ( list.getFirst().isSymbol(tagLink) ) { System.err.println("Not written: "+item) ; super.declItem(list, item) ; return ; } if ( list.getFirst().isSymbol(tagName) ) { if ( ! item.isSymbol() ) throwException("Must be a symbol for a named item: "+item.shortString(), item) ; if ( namedItems.containsKey(item.getSymbol()) ) throwException("Name already defined: "+item, item) ; currentName = item.getSymbol() ; // Add it anyway. Removed in form processing. super.declItem(list, item) ; return ; } super.declItem(list, item) ; }
@Override protected void declItem(ItemList list, Item item) { if ( list.getFirst().isSymbol(tagLink) ) { System.err.println("Not written: "+item) ; super.declItem(list, item) ; return ; } if ( list.getFirst().isSymbol(tagName) ) { if ( ! item.isSymbol() ) throwException("Must be a symbol for a named item: "+item.shortString(), item) ; if ( namedItems.containsKey(item.getSymbol()) ) throwException("Name already defined: "+item, item) ; currentName = item.getSymbol() ; // Add it anyway. Removed in form processing. super.declItem(list, item) ; return ; } super.declItem(list, item) ; }
if ( ! inDecl && /*! sameAsLast &&*/ list.size() == 1 && isForm(list.getFirst() ) )
if ( ! inDecl && /*! sameAsLast &&*/ list.size() == 1 && isForm(list.getFirst() ) )