[metaas-dev] try statements

David Holroyd dave at badgers-in-foil.co.uk
Sun Jan 20 23:13:13 UTC 2008


On Sun, Jan 20, 2008 at 08:45:43PM +0100, R?mi Flament wrote:
> But, as usual, I've found another case that doesn't work :-)
> 
> Basically semi-colons are sometimes optionals...
> 
> In my code I have something like :
> 
>                 if (foo)
>                 {
>                     trace('xyz')
>                 }
> 
> and this is valid according to flexbuilder.
> Note that there's no semicolon at the end of the statement.
> 
> In the specs they talk about "automatic semicolon insertion" in the 
> paragraph 7.9 : 
> http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf
> 
> Personally I think this is stupid and I've corrected my code, but I'm 
> not the one who wrote the specs :-)

You can try enabling this in the grammar by editing

  src/main/antlr/org/asdt/core/internal/antlr/AS3.g3

and changing,

  semi
          :       SEMI!
  //      |       { virtualSemi() }?
          ;	

so that the 'virtualSemi()' line isn't commented-out.

I warn you though that you'll probably need to play with the JVM heap
size settings to allow the JVM to use more memory, e.g.

  MAVEN_OPTS="-mx512M" mvn clean generate-sources

I've currently got this feature disabled because it makes it quite a lot
more difficult to work on the grammar.

Can flexbuilder insert the missing semicolons for you?  :)


ta,
dave

-- 
http://david.holroyd.me.uk/



More information about the metaas-dev mailing list