commit | a34b6dbefb1f822c7f41ab1d759ec3d34be2f242 | [log] [tgz] |
---|---|---|
author | gwt.team.bobv <gwt.team.bobv@8db76d5a-ed1c-0410-87a9-c151d255dfc7> | Thu Nov 29 19:54:54 2007 +0000 |
committer | gwt.team.bobv <gwt.team.bobv@8db76d5a-ed1c-0410-87a9-c151d255dfc7> | Thu Nov 29 19:54:54 2007 +0000 |
tree | 925cfd1b274a9a415c91ed865719259f3c7c1775 | |
parent | b9281df5075015c07dc93b4d1803c6c84a294470 [diff] |
Make JsVars implement Iterable. Update the one use of JsVars.iterator() to use a for-in loop. Patch by: bobv Review by: scottb git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@1561 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java b/dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java index 49328e8..bf07541 100644 --- a/dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java +++ b/dev/core/src/com/google/gwt/dev/js/JsToStringGenerationVisitor.java
@@ -770,9 +770,8 @@ _var(); _space(); boolean sep = false; - for (Iterator<JsVar> iter = x.iterator(); iter.hasNext();) { + for (JsVar var : x) { sep = _sepCommaOptSpace(sep); - JsVars.JsVar var = iter.next(); accept(var); } return false;
diff --git a/dev/core/src/com/google/gwt/dev/js/ast/JsVars.java b/dev/core/src/com/google/gwt/dev/js/ast/JsVars.java index cec31e8..c23e5ff 100644 --- a/dev/core/src/com/google/gwt/dev/js/ast/JsVars.java +++ b/dev/core/src/com/google/gwt/dev/js/ast/JsVars.java
@@ -22,7 +22,7 @@ /** * A JavaScript <code>var</code> statement. */ -public class JsVars extends JsStatement { +public class JsVars extends JsStatement implements Iterable<JsVars.JsVar> { /** * A var declared using the JavaScript <code>var</code> statement.