Nice/src/bossa/parser Parser.jj,1.310,1.311

Daniel Bonniot <[email protected]>
Newsgroups gmane.comp.lang.nice.cvs
Message-ID <[email protected]>
Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15145/src/bossa/parser

Modified Files:
	Parser.jj 
Log Message:
Make sure try and synchronized statements have real blocks as substatements
so that scoping works as expected.


Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.310
retrieving revision 1.311
diff -C2 -d -r1.310 -r1.311
*** Parser.jj	22 Feb 2005 10:27:10 -0000	1.310
--- Parser.jj	22 Feb 2005 12:53:16 -0000	1.311
***************
*** 2838,2847 ****
  }
  {
!   "try" body=Block()
    { res = new TryStmt(body); }
    ( "catch" "(" tc=typeConstructorIdent() i=ident() ")" b=Block()
    { res.addCatch(tc, i, b); }
    )*
!   [ "finally" b=Block() { res.setFinally(b); } ]
    { return res; }
  }
--- 2838,2847 ----
  }
  {
!   "try" body=AlwaysBlock()
    { res = new TryStmt(body); }
    ( "catch" "(" tc=typeConstructorIdent() i=ident() ")" b=Block()
    { res.addCatch(tc, i, b); }
    )*
!   [ "finally" b=AlwaysBlock() { res.setFinally(b); } ]
    { return res; }
  }
***************
*** 2867,2871 ****
  { Expression object; Statement body; }
  {
!   "synchronized" "(" object=Expression() ")" body=Block()
    { return new SynchronizedStmt(object, body); }
  }
--- 2867,2871 ----
  { Expression object; Statement body; }
  {
!   "synchronized" "(" object=Expression() ")" body=AlwaysBlock()
    { return new SynchronizedStmt(object, body); }
  }



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.