[Nice-commit] Nice/src/bossa/syntax typecheck.nice,1.130,1.131 analyse.nice,1.134,1.135
Brought to you by:
bonniot
|
From: Artem Gr K. <ar...@us...> - 2005-04-02 11:47:30
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv339/src/bossa/syntax Modified Files: typecheck.nice analyse.nice Log Message: Replace "assert" with "?assert" in the parser (so that there are two assert idents instead of three). Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.134 retrieving revision 1.135 diff -C2 -d -r1.134 -r1.135 *** analyse.nice 2 Apr 2005 10:55:01 -0000 1.134 --- analyse.nice 2 Apr 2005 11:47:04 -0000 1.135 *************** *** 377,381 **** boolean cannotReturn = e.isCallTo("throw") || ! e.isCallTo("assert") && args.size() > 0 && args.getExp(0).isFalse(); markAsCallFun(notNull(e.function), e.infix); --- 377,381 ---- boolean cannotReturn = e.isCallTo("throw") || ! (e.isCallTo("?assert") || e.isCallTo("!assert")) && args.size() > 0 && args.getExp(0).isFalse(); markAsCallFun(notNull(e.function), e.infix); Index: typecheck.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v retrieving revision 1.130 retrieving revision 1.131 diff -C2 -d -r1.130 -r1.131 *** typecheck.nice 25 Mar 2005 16:40:00 -0000 1.130 --- typecheck.nice 2 Apr 2005 11:47:04 -0000 1.131 *************** *** 221,225 **** e.arguments.typecheckArgs(); ! if (e.isCallTo("assert") && 1 <= e.arguments.size() <= 2) { ?List<MonoSymbol> l = variablesNotNullIfTestSucceeds(e.arguments.getExp(0)); --- 221,225 ---- e.arguments.typecheckArgs(); ! if ((e.isCallTo("?assert") || e.isCallTo("!assert")) && 1 <= e.arguments.size() <= 2) { ?List<MonoSymbol> l = variablesNotNullIfTestSucceeds(e.arguments.getExp(0)); |