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 [EMAIL PROTECTED] 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: [EMAIL PROTECTED] (pending)
QA Reviewer: [EMAIL PROTECTED] (pending)
Doc Reviewer: [EMAIL PROTECTED] (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: [EMAIL PROTECTED]
www: http://www.ddanderson.com





Reply via email to