[Nice-commit] Nice/src/bossa/syntax analyse.nice,1.76,1.77
Brought to you by:
bonniot
From: <bo...@us...> - 2003-07-28 18:06:21
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv25004/src/bossa/syntax Modified Files: analyse.nice Log Message: Handle do/while loops for checking initialization of local variables. Index: analyse.nice =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/analyse.nice,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** analyse.nice 27 Jul 2003 13:14:44 -0000 1.76 --- analyse.nice 28 Jul 2003 18:06:19 -0000 1.77 *************** *** 618,622 **** analyse(l@LoopStmt, info) { ! info.beginInner(); if (l.isTestFirst() && l.whileExp != null) --- 618,625 ---- analyse(l@LoopStmt, info) { ! // If the test comes before the body, then the body might not execute ! // at all, so we must discard its information. ! if (l.isTestFirst()) ! info.beginInner(); if (l.isTestFirst() && l.whileExp != null) *************** *** 648,652 **** l.whileExp = analyse(l.whileExp, info); ! info.endInner(); if (l.isInfinite()) --- 651,656 ---- l.whileExp = analyse(l.whileExp, info); ! if (l.isTestFirst()) ! info.endInner(); if (l.isInfinite()) |