Approved.

I wonder if this is allowed:

  function foo (a:t = x, b:u = (a = y, z))

i.e., I wonder what level of complexity is allowed in the initializer expression, and if you potentially have to parenthesize the expression when you output it?

On 2007-12-21, at 02:28 EST, Donald Anderson wrote:

Change 20071221-dda-4 by [EMAIL PROTECTED] on 2007-12-21 02:15:48 EST
   in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildog
   for http://svn.openlaszlo.org/openlaszlo/branches/devildog

Summary: Added support for initializers in SWF9

New Features:

Bugs Fixed: LPP-5308

Technical Reviewer: ptw (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
- Added grammar to recognize formal parameter initializers,
  param = expression.

- initializers are checked to see that they are null (a current
  restriction) if not, a warning is issued.

- For all runtimes but SWF9, the initializers are removed.
  Eventually that behavior could change for all runtimes
  (no removal of initializers) and with more work, we could
  fully support them.

- changed the unparser to support printing the initializers
  (not as pretty as it should be).

- removed some unused code in CodeGenerator, JavascriptGenerator.

Tests:
- smokecheck SWF8/DHMTL
- added test/optargs.lzx to test all cases, this is
  now accepted by SWF8/DHTML.  Gives reasonable results
  in DHTML.  I believe more work may be needed in SWF8
  to support this.
- temporarily copied the functions from optargs.lzx to
  LzNode to demonstrate it working for SWF9.


Files:
A      test/optargs.lzx
M WEB-INF/lps/server/src/org/openlaszlo/sc/ JavascriptGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/VariableAnalyzer.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9Generator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/ParseTreePrinter.java
M      WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071221-dda-4.tar



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: [EMAIL PROTECTED]
www: http://www.ddanderson.com





Reply via email to