Update of /cvsroot/nice/Nice/src/bossa/parser
In directory sc8-pr-cvs1:/tmp/cvs-serv11845/F:/nice/src/bossa/parser
Modified Files:
Parser.jj
Log Message:
give warning if the deprecated fun(...)=> syntax is used.
Index: Parser.jj
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v
retrieving revision 1.137
retrieving revision 1.138
diff -C2 -d -r1.137 -r1.138
*** Parser.jj 17 Feb 2003 15:42:03 -0000 1.137
--- Parser.jj 19 Feb 2003 09:59:50 -0000 1.138
***************
*** 1546,1552 ****
Statement body;
Expression exp;
}
{
! "fun"
cst=constraint()
"(" formals=monoSymbols() ")"
--- 1546,1553 ----
Statement body;
Expression exp;
+ Token f = null;
}
{
! f = "fun"
cst=constraint()
"(" formals=monoSymbols() ")"
***************
*** 1560,1564 ****
}
)
! { return new FunExp(cst,formals,body); }
}
--- 1561,1569 ----
}
)
! {
! if (f != null)
! bossa.util.User.warning(new Location(f), "The 'fun(...) =>' syntax is deprecated, just leave 'fun' away.");
! return new FunExp(cst,formals,body);
! }
}
|