[Nice-commit] Nice/src/bossa/syntax CustomConstructor.java,1.4,1.5
Brought to you by:
bonniot
From: <bo...@us...> - 2003-12-14 09:42:45
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv11548/src/bossa/syntax Modified Files: CustomConstructor.java Log Message: Find the associated NiceClass, and perform analyse and typechecking (without support for 'this' call). Index: CustomConstructor.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/CustomConstructor.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CustomConstructor.java 13 Dec 2003 17:52:01 -0000 1.4 --- CustomConstructor.java 13 Dec 2003 18:59:00 -0000 1.5 *************** *** 44,49 **** void resolve() { ! classTC = Node.getGlobalTypeScope().globalLookup(className); ! TypeConstructors.addConstructor(classTC, this); } --- 44,70 ---- void resolve() { ! TypeConstructor tc = Node.getGlobalTypeScope().globalLookup(className); ! TypeConstructors.addConstructor(tc, this); ! classe = NiceClass.get(tc); ! ! // Save the scopes, since we need them later, but they get null'ed. ! thisScope = scope; ! thisTypeScope = typeScope; ! } ! ! private VarScope thisScope; ! private TypeScope thisTypeScope; ! ! void resolveBody() ! { ! body = bossa.syntax.dispatch.analyse ! (body, thisScope, thisTypeScope, false); ! } ! ! void innerTypecheck() throws TypingEx ! { ! super.innerTypecheck(); ! ! bossa.syntax.dispatch.typecheck(body); } *************** *** 71,76 **** LocatedString className; ! Block body; ! TypeConstructor classTC; NiceClass classe; } --- 92,96 ---- LocatedString className; ! Statement body; NiceClass classe; } |