<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/impl/<a href="#file1">ASTASInvocationExpression.java</a></tt> </td><td></td><td align="right" id="added">+8</td><td align="right" id="removed">-1</td><td nowrap="nowrap" align="center">517 -&gt; 518</td></tr>
<tr class="alt"><td><tt>test/java/uk/co/badgersinfoil/metaas/<a href="#file2">InvocationExpressionTests.java</a></tt> </td><td></td><td align="right" id="added">+23</td><td align="right" id="removed">-2</td><td nowrap="nowrap" align="center">517 -&gt; 518</td></tr>
<tr><td></td><td></td><td align="right" id="added">+31</td><td align="right" id="removed">-3</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<pre class="comment">
get argument handling working
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">metaas/trunk/src/main/java/uk/co/badgersinfoil/metaas/impl</span><br />
<div class="fileheader"><big><b>ASTASInvocationExpression.java</b></big> <small id="info">517 -&gt; 518</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASInvocationExpression.java        2007-09-01 21:16:07 UTC (rev 517)
+++ trunk/src/main/java/uk/co/badgersinfoil/metaas/impl/ASTASInvocationExpression.java        2007-09-01 21:25:56 UTC (rev 518)
@@ -31,10 +31,17 @@
</small></pre><pre class="diff" id="context">         }
 
         public void setArguments(List args) {
</pre><pre class="diff" id="removed">-                LinkedListTree arguments = ASTUtils.findChildByType(ast, AS3Parser.ARGUMENTS);<span id="removedchars">                </span>
</pre><pre class="diff" id="added">+                LinkedListTree arguments = ASTUtils.findChildByType(ast, AS3Parser.ARGUMENTS);
+                // get rid of any old arguments,
+                ASTUtils.deleteAllChildren(arguments);
+                // add the new arguments,
</pre><pre class="diff" id="context">                 for (Iterator i=args.iterator(); i.hasNext(); ) {
                         ASTASExpression arg = (ASTASExpression)i.next();
                         arguments.addChildWithTokens(arg.getAST());
</pre><pre class="diff" id="added">+                        if (i.hasNext()) {
+                                arguments.appendToken(TokenBuilder.newComma());
+                                arguments.appendToken(TokenBuilder.newSpace());
+                        }
</pre><pre class="diff" id="context">                 }
         }
 
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname">metaas/trunk/src/test/java/uk/co/badgersinfoil/metaas</span><br />
<div class="fileheader"><big><b>InvocationExpressionTests.java</b></big> <small id="info">517 -&gt; 518</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/metaas/InvocationExpressionTests.java        2007-09-01 21:16:07 UTC (rev 517)
+++ trunk/src/test/java/uk/co/badgersinfoil/metaas/InvocationExpressionTests.java        2007-09-01 21:25:56 UTC (rev 518)
@@ -6,9 +6,12 @@
</small></pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.dom.ASExpression;
 import uk.co.badgersinfoil.metaas.dom.ASIntegerLiteral;
 import uk.co.badgersinfoil.metaas.dom.ASInvocationExpression;
</pre><pre class="diff" id="added">+import uk.co.badgersinfoil.metaas.dom.ASStringLiteral;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.impl.AS3FragmentParser;
</pre><pre class="diff" id="added">+import uk.co.badgersinfoil.metaas.impl.ASTASExpression;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.impl.ASTASInvocationExpression;
 import uk.co.badgersinfoil.metaas.impl.ASTPrinter;
</pre><pre class="diff" id="added">+import uk.co.badgersinfoil.metaas.impl.antlr.ASTDot;
</pre><pre class="diff" id="context"> import uk.co.badgersinfoil.metaas.impl.antlr.LinkedListTree;
 import junit.framework.TestCase;
 
</pre><pre class="diff"><small id="info">@@ -27,6 +30,7 @@
</small></pre><pre class="diff" id="context">                 StringWriter buff = new StringWriter();
                 LinkedListTree ast = ((ASTASInvocationExpression)expr).getAST();
                 new ASTPrinter(buff).print(ast);
</pre><pre class="diff" id="added">+System.out.println(buff);
</pre><pre class="diff" id="context">                 LinkedListTree parsed = AS3FragmentParser.parseExpr(buff.toString());
                 CodeMirror.assertASTMatch(ast, parsed);
         }
</pre><pre class="diff"><small id="info">@@ -49,10 +53,27 @@
</small></pre><pre class="diff" id="context">         public void testSetArguments() {
                 expr = fact.newInvocationExpression(sub, args);
                 List newArgs = new ArrayList();
</pre><pre class="diff" id="added">+                ASIntegerLiteral arg1 = fact.newIntegerLiteral(1);
+                newArgs.add(arg1);
+                ASStringLiteral arg2 = fact.newStringLiteral("foo");
+                newArgs.add(arg2);
+                expr.setArguments(newArgs);
+                assertEquals(2, expr.getArguments().size());
+                assertEquals(arg1, expr.getArguments().get(0));
+                assertEquals(arg2, expr.getArguments().get(1));
+        }
+
+        public void testReplaceArguments() {
+                expr = fact.newInvocationExpression(sub, args);
+                List args = new ArrayList();
</pre><pre class="diff" id="context">                 ASIntegerLiteral arg = fact.newIntegerLiteral(1);
</pre><pre class="diff" id="removed">-                <span id="removedchars">newA</span>rgs.add(arg);
</pre><pre class="diff" id="added">+                <span id="addedchars">a</span>rgs.add(arg);
+                expr.setArguments(args);
+                List newArgs = new ArrayList();
+                ASStringLiteral newArg = fact.newStringLiteral("foo");
+                newArgs.add(newArg);
</pre><pre class="diff" id="context">                 expr.setArguments(newArgs);
                 assertEquals(1, expr.getArguments().size());
</pre><pre class="diff" id="removed">-                assertEquals(<span id="removedchars">a</span>rg, expr.getArguments().get(0));
</pre><pre class="diff" id="added">+                assertEquals(<span id="addedchars">newA</span>rg, expr.getArguments().get(0));
</pre><pre class="diff" id="context">         }
 }
</pre><pre class="diff"><small id="info">\ No newline at end of file
</small></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>