<html>
<head>
<style><!--
  body {background-color:#ffffff;}
  .file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
  .pathname {font-family:monospace; float:right;}
  .fileheader {margin-bottom:.5em;}
  .diff {margin:0;}
  .tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
  .tasklist ul {margin-top:0;margin-bottom:0;}
  tr.alt {background-color:#eeeeee}
  #added {background-color:#ddffdd;}
  #addedchars {background-color:#99ff99;font-weight:bolder;}
  tr.alt #added {background-color:#ccf7cc;}
  #removed {background-color:#ffdddd;}
  #removedchars {background-color:#ff9999;font-weight:bolder;}
  tr.alt #removed {background-color:#f7cccc;}
  #copied {background-color:#ccccff;}
  tr.alt #copied {background-color:#bbbbf7;}
  #info {color:#888888;}
  #context {background-color:#eeeeee;}
  td {padding-left:.3em;padding-right:.3em;}
  tr.head {border-bottom-width:1px;border-bottom-style:solid;}
  tr.head td {padding:0;padding-top:.2em;}
  .task {background-color:#ffff00;}
  .comment {white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;white-space:pre-wrap;word-wrap:break-word;padding:4px;border:1px dashed #000000;background-color:#ffffdd}
  .error {color:red;}
  hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="5">Commit in <b><tt>metaas/trunk/src</tt></b></td></tr>
<tr><td><tt>main/java/uk/co/badgersinfoil/metaas/dom/<a href="#file1">ASWithStatement.java</a></tt> </td><td></td><td align="right" id="added">+5</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">605 -&gt; 606</td></tr>
<tr class="alt"><td><tt>main/java/uk/co/badgersinfoil/metaas/impl/<a href="#file2">ASTASWithStatement.java</a></tt> </td><td></td><td align="right" id="added">+14</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">605 -&gt; 606</td></tr>
<tr><td><tt>test/java/uk/co/badgersinfoil/metaas/<a href="#file3">StatementTests.java</a></tt> </td><td></td><td align="right" id="added">+5</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">605 -&gt; 606</td></tr>
<tr><td></td><td></td><td align="right" id="added">+24</td><td align="right" id="removed">-4</td><td></td></tr>
</table>
<small id="info">3 modified files</small><br />
<pre class="comment">
ASExpression support for with-statement
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/dom</span><br />
<div class="fileheader"><big><b>ASWithStatement.java</b></big> <small id="info">605 -&gt; 606</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/dom/ASWithStatement.java        2008-01-19 01:17:15 UTC (rev 605)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/dom/ASWithStatement.java        2008-01-19 01:22:26 UTC (rev 606)
@@ -26,6 +26,8 @@
</small></pre><pre class="diff" id="context">          */
         public String getScopeString();
 
</pre><pre class="diff" id="added">+        public ASExpression getScope();
+
</pre><pre class="diff" id="context">         /**
          * Changes the expression who's value will be used as new scope for the
          * execution of the statements in the body of this with-statement.
</pre><pre class="diff"><small id="info">@@ -33,5 +35,7 @@
</small></pre><pre class="diff" id="context">          * @throws SyntaxException if the given string is not a valid
          *         ActionScript expression.
          */
</pre><pre class="diff" id="removed">-        public void setScope(String <span id="removedchars">string</span>);
</pre><pre class="diff" id="added">+        public void setScope(String <span id="addedchars">expr</span>);
+
+        public void setScope(ASExpression expr);
</pre><pre class="diff" id="context"> }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASWithStatement.java</b></big> <small id="info">605 -&gt; 606</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASWithStatement.java        2008-01-19 01:17:15 UTC (rev 605)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASWithStatement.java        2008-01-19 01:22:26 UTC (rev 606)
@@ -1,5 +1,6 @@
</small></pre><pre class="diff" id="context"> package uk.co.badgersinfoil.metaas.impl;
 
</pre><pre class="diff" id="added">+import uk.co.badgersinfoil.metaas.dom.ASExpression;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASWithStatement;
 import uk.co.badgersinfoil.metaas.dom.StatementContainer;
 import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
</pre><pre class="diff"><small id="info">@@ -18,11 +19,23 @@
</small></pre><pre class="diff" id="context">         }
 
         public String getScopeString() {
</pre><pre class="diff" id="removed">-                return ASTUtils.stringifyNode(<span id="removedchars">ast.getFirstChild</span>().getFirstChild());
</pre><pre class="diff" id="added">+                return ASTUtils.stringifyNode(<span id="addedchars">scope</span>().getFirstChild());
</pre><pre class="diff" id="context">         }
 
</pre><pre class="diff" id="added">+        public ASExpression getScope() {
+                return ExpressionBuilder.build(scope().getFirstChild());
+        }
+
+        private LinkedListTree scope() {
+                return ast.getFirstChild();
+        }
+
</pre><pre class="diff" id="context">         public void setScope(String expr) {
                 LinkedListTree cond = AS3FragmentParser.parseCondition(expr);
                 ast.setChildWithTokens(INDEX_CONDITION, cond);
         }
</pre><pre class="diff" id="added">+
+        public void setScope(ASExpression expr) {
+                scope().setChildWithTokens(0, ast(expr));
+        }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname">metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</span><br />
<div class="fileheader"><big><b>StatementTests.java</b></big> <small id="info">605 -&gt; 606</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/metaas/StatementTests.java        2008-01-19 01:17:15 UTC (rev 605)
+++ trunk/src/test/java/uk/co/badgersinfoil/metaas/StatementTests.java        2008-01-19 01:22:26 UTC (rev 606)
@@ -245,8 +245,11 @@
</small></pre><pre class="diff" id="context">                 ASWithStatement with = meth.newWith("foo");
                 with.addStmt("trace(test)");
                 assertEquals("foo", with.getScopeString());
</pre><pre class="diff" id="removed">-                with.setScope("bar");
-                assertEquals("bar", with.getScopeString());
</pre><pre class="diff" id="added">+                with.setScope("foo.bar");
+                assertEquals("foo.bar", with.getScopeString());
+                ExtraAssertions.assertInstanceof(with.getScope(), ASFieldAccessExpression.class);
+                with.setScope(fact.newExpression("bar.foo"));
+                ExtraAssertions.assertInstanceof(with.getScope(), ASFieldAccessExpression.class);
</pre><pre class="diff" id="context">         }
 
         public void testDeclaration() {
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -&gt; email">CVSspam</a> 0.2.12</small></center>
</body></html>