<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/antlr/org/asdt/core/internal/antlr/<a href="#file1">AS3.g3</a></tt> </td><td></td><td align="right" id="added">+12</td><td align="right" id="removed">-6</td><td nowrap="nowrap" align="center">683 -> 684</td></tr>
<tr class="alt"><td><tt>test/java/uk/co/badgersinfoil/metaas/<a href="#file2">FunctionExpressionTests.java</a></tt> </td><td></td><td align="right" id="added">+6</td><td></td><td nowrap="nowrap" align="center">683 -> 684</td></tr>
<tr><td></td><td></td><td align="right" id="added">+18</td><td align="right" id="removed">-6</td><td></td></tr>
</table>
<small id="info">2 modified files</small><br />
<div class="tasklist"><ul>
<li><a href="#task1">TODO: block should be optional here,
</a></li>
</ul></div>
<pre class="comment">
alter grammar to allow function expressions to name the function
</pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname">metaas/trunk/src/main/antlr/org/asdt/core/internal/antlr</span><br />
<div class="fileheader"><big><b>AS3.g3</b></big> <small id="info">683 -> 684</small></div>
<pre class="diff"><small id="info">--- trunk/src/main/antlr/org/asdt/core/internal/antlr/AS3.g3        2008-02-14 22:43:29 UTC (rev 683)
+++ trunk/src/main/antlr/org/asdt/core/internal/antlr/AS3.g3        2008-02-18 08:47:48 UTC (rev 684)
@@ -1063,7 +1063,7 @@
</small></pre><pre class="diff" id="context">         |        constant
        |        arrayLiteral
        |        objectLiteral
</pre><pre class="diff" id="removed">-        |        function<span id="removedchars">Definit</span>ion
</pre><pre class="diff" id="added">+        |        function<span id="addedchars">Express</span>ion
</pre><pre class="diff" id="context">         |        newExpression
        |        encapsulatedExpression
        |        e4xAttributeIdentifier
</pre><pre class="diff"><small id="info">@@ -1174,15 +1174,21 @@
</small></pre><pre class="diff" id="context">                 -> ^(ENCPS_EXPR assignmentExpression)
       
</pre><pre class="diff" id="removed">-// TODO: should anonymous and named functions have seperate definitions so that
-// we can dissallow named functions in expressions?
</pre><pre class="diff" id="added">+functionSignature
+        :        parameterDeclarationList typeExpression?
+       
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">-functionDefinition
-        :        FUNCTION parameterDeclarationList typeExpression? block
-                -> ^(FUNC_DEF parameterDeclarationList typeExpression? block)
</pre><pre class="diff" id="added"><a name="task1" />+// <span class="task">TODO</span>: block should be optional here,
+functionCommon
+        :        functionSignature block
</pre><pre class="diff" id="context">        
</pre><pre class="diff" id="added">+functionExpression
+        :        FUNCTION IDENT? functionCommon
+                -> ^(FUNC_DEF IDENT? functionCommon)
+       
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> ident
        :        IDENT
        |        i=USE -> IDENT[$i]
</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>FunctionExpressionTests.java</b></big> <small id="info">683 -> 684</small></div>
<pre class="diff"><small id="info">--- trunk/src/test/java/uk/co/badgersinfoil/metaas/FunctionExpressionTests.java        2008-02-14 22:43:29 UTC (rev 683)
+++ trunk/src/test/java/uk/co/badgersinfoil/metaas/FunctionExpressionTests.java        2008-02-18 08:47:48 UTC (rev 684)
@@ -46,4 +46,10 @@
</small></pre><pre class="diff" id="context">                 ASAssignmentExpression assign = (ASAssignmentExpression)exprStmt.getExpression();
                ExtraAssertions.assertInstanceof(assign.getRightSubexpression(), ASFunctionExpression.class);
        }
</pre><pre class="diff" id="added">+
+        public void testParseNamed() {
+                ASExpressionStatement exprStmt = (ASExpressionStatement)meth.addStmt("theFunc = function fn() { trace('foo!'); }");
+                ASAssignmentExpression assign = (ASAssignmentExpression)exprStmt.getExpression();
+                ExtraAssertions.assertInstanceof(assign.getRightSubexpression(), ASFunctionExpression.class);
+        }
</pre><pre class="diff" id="context"> }
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" title="commit -> email">CVSspam</a> 0.2.12</small></center>
</body></html>