[Laszlo-dev] For Review: Change 20080108-ptw-a Summary: add support for `cast` keyword in javascript

P T Withington ptw at pobox.com
Tue Jan 8 09:04:14 PST 2008


Change 20080108-ptw-a by ptw at dueling-banjos.local on 2008-01-08  
11:56:44 EST
     in /Users/ptw/OpenLaszlo/ringding-2
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: add support for `cast` keyword in javascript

Bugs Fixed:
LPP-5336 'add support for `cast` keyword in javascript'

Technical Reviewer: dda at ddanderson.com (pending)
QA Reviewer: henry.minsky at gmail.com (pending)
Doc Reviewer: lou at louiorio.com (pending)

Documentation:
We now support the JS2 `cast` operator: <value> cast <type
expression>.  In JS1 runtimes this is a no-op.  In JS2 runtimes it
will be passed through and ensures that the value is of the correct
static type.

Details:
     lztest-class-impl: Add tests suggested by Don for more complex
     `is` expressions.  Add tests for `cast` expressions

     JavascriptGenerator, CodeGenerator, Parser, ParseTreePrinter: add
     support for `cast` as a no-op (just returns the value or lhs).
     Put back code that deals with null source files for now.

Tests:
     lztest-class-impl

Files:
M      test/lztest/lztest-class-impl.lzx
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.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/20080108-ptw-a.tar


More information about the Laszlo-dev mailing list