[Laszlo-dev] parser bug with declaring type '*' ?

Donald Anderson dda at ddanderson.com
Wed Jan 16 13:00:24 PST 2008


Henry,

This fix was put into trunk last week, now it should be in devildog.

On Jan 8, 2008, at 11:30 AM, Henry Minsky wrote:

> I got a parser error in this code, apparently the type declaration for
> "var s:*" is confusing it
>
> class lzutils {
>
>    public static function objAsString(obj:*):String {
>    var s:* = "";
>        for (var k:* in obj) {
>            s+= k +": "+obj[k];
>            s+=", ";
>        }
>        return s;
>    }
> }
>
> lzl:
>     [echo] Compiling C:\users\hqm\openlaszlo\devildog/lps/includes/ 
> lfc/LFC9.lzl
>     [java] while compiling
> C:\users\hqm\openlaszlo\devildog\WEB-INF\lps\lfc\core\LzDefs.js
>     [java] while compiling
> C:\users\hqm\openlaszlo\devildog\WEB-INF\lps\lfc\core\Library.lzs
>     [java] Exception compiling scriptfile: Syntax error: the token ":
> * in" was not expected at this position at line 107, column 19.
>     [java] Was expecting one of: in, =, :, :, :
>     [java] org.openlaszlo.sc.parser.ParseException: Syntax error: the
> token ": * in" was not expected at this position at line 107, column
> 19.
>     [java] Was expecting one of: in, =, :, :, :
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.generateParseException(Parser.java: 
> 9375)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.jj_consume_token(Parser.java:9250)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.ForVarInStatement(Parser.java:3561)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.IterationStatement(Parser.java:3039)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.ToplevelStatement(Parser.java:2316)
>     [java] 	at org.openlaszlo.sc.parser.Parser.Statement(Parser.java: 
> 2408)
>     [java] 	at  
> org.openlaszlo.sc.parser.Parser.StatementList(Parser.java:4861)
>     [java] 	at org.openlaszlo.sc.parser.Parser.Block(Parser.java:2647)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.FunctionDeclaration(Parser.java:4223)
>     [java] 	at  
> org.openlaszlo.sc.parser.Parser.ClassProperty(Parser.java:5215)
>     [java] 	at  
> org.openlaszlo.sc.parser.Parser.ClassDirective(Parser.java:5345)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.ClassDefinition(Parser.java:5765)
>     [java] 	at
> org.openlaszlo.sc.parser.Parser.ModifiedDefinition(Parser.java:4571)
>     [java] 	at org.openlaszlo.sc.parser.Parser.Directive(Parser.java: 
> 4602)
>     [java] 	at org.openlaszlo.sc.parser.Parser.Program(Parser.java: 
> 4526)
>     [java] 	at org.openlaszlo.sc.Compiler 
> $Parser.parse0(Compiler.java:469)
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com


--

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