[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 11:45:45 PST 2008
Ok, you should integrate from trunk to get 'is' and 'cast' support.
For 'is' you can just pass through, but 'cast' needs to be translated
to 'as'. Henry should be using 'cast' in his code so we are JS2-
compilant. (I assume AS3 will eventually support 'cast', but it only
has 'as' for now).
On 2008-01-08, at 12:59 EST, Donald Anderson wrote:
> Approved.
>
> On Jan 8, 2008, at 12:04 PM, P T Withington wrote:
>
>> 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
>
>
> --
>
> Don Anderson
> Java/C/C++, Berkeley DB, systems consultant
>
> voice: 617-547-7881
> email: dda at ddanderson.com
> www: http://www.ddanderson.com
>
>
>
>
More information about the Laszlo-dev
mailing list