[Laszlo-dev] For Review: Change 20071127-ptw-C Summary: Correct handling of comma-separated var expressions

P T Withington ptw at pobox.com
Tue Nov 27 14:31:30 PST 2007


Change 20071127-ptw-C by ptw at dueling-banjos.local on 2007-11-27  
16:41:07 EST
     in /Users/ptw/OpenLaszlo/ringding-2
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Correct handling of comma-separated var expressions

Bugs Fixed:
LPP-5129 ' lzo's compile differently? for (var i = 0, len =  
childNodes.length; i < len; i++) { causes error'

Technical Reviewer: dda at ddanderson.com (pending)
QA Reviewer: hminsky (pending)

Details:
     JavascriptGenerator: Handle variableStatement, consolidate
     isExpression

     CommonGenerator: Handle new AST type VariableDeclarationList, mov
     base isExpression here

     ASTVisitor: Add interfaces for VariableDeclaration and
     VariableDeclarationList

     Compiler: A VariableStatement cannot be handled as a Statement.
     Implement correct unparsing of VariableStatement,
     VariableDeclarationList, and VariableDeclaration.

     CodeGenerator: consolidate isExpression

     Parser: Parse comma-separated variable declarations into new AST
     VariableDeclarationList

Tests:
     smokecheck

     observed that test case in bug report is correctly passed through
     for dhtml

Files:
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/CommonGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/ASTVisitor.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/sc/src/org/openlaszlo/sc/Parser.jjt


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20071127-ptw-C.tar


More information about the Laszlo-dev mailing list