[Nice-commit] Nice/src/bossa/syntax analyse.nice,1.55,1.56 typecheck.nice,1.49,1.50
Brought to you by:
bonniot
|
From: <ar...@us...> - 2003-02-18 23:39:48
|
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv5769/F:/nice/src/bossa/syntax
Modified Files:
analyse.nice typecheck.nice
Log Message:
replace iter with foreach and removed the last 'fun' of fun(...)=> in the compiler source
Index: analyse.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v
retrieving revision 1.55
retrieving revision 1.56
diff -C2 -d -r1.55 -r1.56
*** analyse.nice 24 Jan 2003 19:09:24 -0000 1.55
--- analyse.nice 18 Feb 2003 23:39:43 -0000 1.56
***************
*** 179,186 ****
void addVars(Array<?MonoSymbol> symbols) =
! symbols.iter(?MonoSymbol s => this.addVar(notNull(s)));
void addTypeVars(Array<TypeSymbol> symbols) =
! symbols.iter(TypeSymbol s => this.typeVars[s.toString()] = s);
}
--- 179,186 ----
void addVars(Array<?MonoSymbol> symbols) =
! symbols.foreach(?MonoSymbol s => this.addVar(notNull(s)));
void addTypeVars(Array<TypeSymbol> symbols) =
! symbols.foreach(TypeSymbol s => this.typeVars[s.toString()] = s);
}
***************
*** 555,559 ****
{
info.begin();
! notNull(b.locals).iter(Block.LocalDeclaration l => analyse(l, info));
analyse(b.statements, info);
info.end();
--- 555,559 ----
{
info.begin();
! notNull(b.locals).foreach(Block.LocalDeclaration l => analyse(l, info));
analyse(b.statements, info);
info.end();
***************
*** 623,627 ****
private LabeledStmt findLabel(LocatedString label, Info info)
{
! return info.labels.findLast(fun(LabeledStmt l)=> l.name.equals(label.toString()));
}
--- 623,627 ----
private LabeledStmt findLabel(LocatedString label, Info info)
{
! return info.labels.findLast(LabeledStmt l => l.name.equals(label.toString()));
}
***************
*** 679,683 ****
analyse(t.body, info);
! t.catches.iter(TryStmt.Catch c =>{
info.otherCase();
info.begin();
--- 679,683 ----
analyse(t.body, info);
! t.catches.foreach(TryStmt.Catch c =>{
info.otherCase();
info.begin();
Index: typecheck.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/typecheck.nice,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** typecheck.nice 8 Feb 2003 16:07:57 -0000 1.49
--- typecheck.nice 18 Feb 2003 23:39:44 -0000 1.50
***************
*** 301,305 ****
if (notNullInElse != null)
! notNullInElse.iter(MonoSymbol variable => {
mlsub.typing.Monotype type = notNull(variable.type);
mlsub.typing.Monotype sureType = makeSure(type);
--- 301,305 ----
if (notNullInElse != null)
! notNullInElse.foreach(MonoSymbol variable => {
mlsub.typing.Monotype type = notNull(variable.type);
mlsub.typing.Monotype sureType = makeSure(type);
***************
*** 428,432 ****
b.statements = rewrite(b.statements);
! b.locals.iter(?Block.LocalDeclaration d => typecheck(d));
b.statements.foreach
(?Statement s => {
--- 428,432 ----
b.statements = rewrite(b.statements);
! b.locals.foreach(?Block.LocalDeclaration d => typecheck(d));
b.statements.foreach
(?Statement s => {
***************
*** 552,556 ****
{
typecheck(t.body);
! t.catches.iter(TryStmt.Catch c => typecheck(c.body));
typecheck(t.finallyBody);
}
--- 552,556 ----
{
typecheck(t.body);
! t.catches.foreach(TryStmt.Catch c => typecheck(c.body));
typecheck(t.finallyBody);
}
|