Author: dda
Date: 2007-12-18 05:57:35 -0800 (Tue, 18 Dec 2007)
New Revision: 7588
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java
Log:
Change 20071218-dda-P by [EMAIL PROTECTED] on 2007-12-18 08:48:52 EST
in /Users/dda/laszlo/src/svn/openlaszlo/branches/devildog
for http://svn.openlaszlo.org/openlaszlo/branches/devildog
Summary: Two fixes to fix compile errors in Instance.js
New Features: none
Bugs Fixed: LPP-5234
Technical Reviewer: ptw (pending)
QA Reviewer: hminsky (pending)
Doc Reviewer: (pending)
Documentation: none
Release Notes: none
Details:
Two fixes are included.
1) For typed variables, ':*' is now allowed, to mean 'untyped'.
For SWF9 we just pass it through.
2) An extra 'public' was produced in the class declaration, since we blindly
added one before.
Rather than assume every class is public, we'll rely on the author of
the code to indicate the visibility. If none is indicated, none will
be emitted. For the moment, everything is in the same package so
the default visibility (internal) is sufficient.
Tests:
Using the swf9 Instance.js to compile.
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
===================================================================
---
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
2007-12-18 13:56:29 UTC (rev 7587)
+++
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/Parser.jjt
2007-12-18 13:57:35 UTC (rev 7588)
@@ -682,12 +682,13 @@
ASTIdentifier.Type TypeIdentifier() #void : { Token t; ASTIdentifier.Type type
= new ASTIdentifier.Type(); }
{
- (
+ ("*" {type.typeName = "*"; type.untyped = true;}
+ |(
t = <IDENTIFIER> {type.typeName = t.image;}
[ NotNullable() {type.notnullable = true; }
| Nullable() {type.nullable = true; }
]
- ) {
+ )) {
return type;
}
}
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java
===================================================================
---
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java
2007-12-18 13:56:29 UTC (rev 7587)
+++
openlaszlo/branches/devildog/WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ASTIdentifier.java
2007-12-18 13:57:35 UTC (rev 7588)
@@ -19,6 +19,7 @@
public String typeName = null;
public boolean nullable = false; // has "?"
public boolean notnullable = false; // has "!"
+ public boolean untyped = false; // is "*"
public String toString() {
String result = typeName;
Modified:
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java
===================================================================
---
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java
2007-12-18 13:56:29 UTC (rev 7587)
+++
openlaszlo/branches/devildog/WEB-INF/lps/server/src/org/openlaszlo/sc/SWF9ParseTreePrinter.java
2007-12-18 13:57:35 UTC (rev 7588)
@@ -121,7 +121,7 @@
public String visitClassDefinition(SimpleNode node, String[] children) {
String classnm = unannotate(children[1]);
StringBuffer sb = new StringBuffer();
- sb.append("public class" + SPACE + classnm + SPACE);
+ sb.append("class" + SPACE + classnm + SPACE);
if (unannotate(children[2]).length() > 0)
sb.append("extends" + SPACE + children[2] + SPACE);
_______________________________________________
Laszlo-checkins mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins