// Copyright (c) 2001-2003, Jonathan Bachrach, Tom White. See file LICENSE. import net.sf.jse.IdentifierFragment; import net.sf.jse.Fragment; public syntax foreach { case #{ foreach (?t:type ?element:name in ?exp:expression) ?stmt:statement }: { Fragment i = IdentifierFragment.genSym("i"); return #{ for(java.util.Iterator ?i = ?exp.iterator(); ?i.hasNext(); ) { ?t ?element = (?t) ?i.next(); ?stmt } }; } }