Author: dda
Date: 2008-01-27 14:36:43 -0800 (Sun, 27 Jan 2008)
New Revision: 7901
Modified:
openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
openlaszlo/trunk/test/trycatch.lzx
Log:
Change 20080126-dda-y by [EMAIL PROTECTED] on 2008-01-26 18:02:53 EST
in /Users/dda/laszlo/src/svn/openlaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: script compiler: Add type to catch clause.
New Features:
Bugs Fixed: LPP-5381
Technical Reviewer: ptw (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
Fix is simple - according to the ES4 grammar, the catch 'parameter' should
look the same as a function parameter (without the possibility of an init
clause).
Note that when merged with devildog, this will need to be tweaked slightly
as the grammars are now different.
Specifically, FormalParameter() will be FormalParameterIdentifier().
Tests:
Modified:
openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
2008-01-27 22:33:43 UTC (rev 7900)
+++ openlaszlo/trunk/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
2008-01-27 22:36:43 UTC (rev 7901)
@@ -875,7 +875,7 @@
void CatchClause() #CatchClause : {}
{
- "catch" "(" Identifier() ")" Block()
+ "catch" "(" FormalParameter() ")" Block()
}
void FinallyClause() #FinallyClause : {}
Modified: openlaszlo/trunk/test/trycatch.lzx
===================================================================
--- openlaszlo/trunk/test/trycatch.lzx 2008-01-27 22:33:43 UTC (rev 7900)
+++ openlaszlo/trunk/test/trycatch.lzx 2008-01-27 22:36:43 UTC (rev 7901)
@@ -32,7 +32,7 @@
flawed.func();
status1.setText("after func, should not see!");
}
- catch (ex) {
+ catch (ex:String) {
status2.setText("OKAY 2: exception text = " + ex);
}
finally {
@@ -43,6 +43,6 @@
</script>
</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2007 Laszlo Systems, Inc. All Rights Reserved. *
+* Copyright 2001-2008 Laszlo Systems, Inc. All Rights Reserved. *
* Use is subject to license terms. *
* X_LZ_COPYRIGHT_END ****************************************************** -->
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins