[Nice-commit] Nice/src/bossa/parser Parser.jj,1.206,1.207
Brought to you by:
bonniot
From: <bo...@us...> - 2003-09-11 20:50:34
|
Update of /cvsroot/nice/Nice/src/bossa/parser In directory sc8-pr-cvs1:/tmp/cvs-serv27659/src/bossa/parser Modified Files: Parser.jj Log Message: Replaced functions by methods with a default implementation. Index: Parser.jj =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/parser/Parser.jj,v retrieving revision 1.206 retrieving revision 1.207 diff -C2 -d -r1.206 -r1.207 *** Parser.jj 2 Sep 2003 19:57:51 -0000 1.206 --- Parser.jj 11 Sep 2003 20:50:27 -0000 1.207 *************** *** 853,857 **** } ! MethodDeclaration internalMethodOrFunction(MethodContainer c): { LocatedString name; --- 853,857 ---- } ! Definition internalMethodOrFunction(MethodContainer c): { LocatedString name; *************** *** 1002,1006 **** { globalDefinitions.add(mb); } | ! { MethodDeclaration m; } m = internalMethodOrFunction(res) { --- 1002,1006 ---- { globalDefinitions.add(mb); } | ! { Definition m; } m = internalMethodOrFunction(res) { *************** *** 1052,1056 **** extensions); } ( ! { MethodDeclaration m; } [ "public" | "private" ] m = internalMethodOrFunction(res) --- 1052,1056 ---- extensions); } ( ! { Definition m; } [ "public" | "private" ] m = internalMethodOrFunction(res) *************** *** 1245,1249 **** } ! MethodDeclaration methodDeclaration(): { LocatedString name; --- 1245,1249 ---- } ! Definition methodDeclaration(): { LocatedString name; *************** *** 1251,1255 **** FormalParameters parameters; Constraint cst; ! MethodDeclaration res; List statements = new LinkedList(); } --- 1251,1255 ---- FormalParameters parameters; Constraint cst; ! Definition res; List statements = new LinkedList(); } *************** *** 1280,1285 **** { Statement body; } body=code() { statements.add(body); } ! { res = new ToplevelFunction(name, cst, returnType, parameters, ! body!=null?new Block(statements):null, contract);} | // Nice method --- 1280,1288 ---- { Statement body; } body=code() { statements.add(body); } ! { res = NiceMethod.WithDefault.create ! (name, cst, returnType, parameters, ! body != null ? new Block(statements) : null, ! contract); ! } | // Nice method |