[Nice-commit] Nice/src/bossa/syntax Pattern.java,1.40,1.41
Brought to you by:
bonniot
From: <ar...@us...> - 2003-02-25 19:52:44
|
Update of /cvsroot/nice/Nice/src/bossa/syntax In directory sc8-pr-cvs1:/tmp/cvs-serv30208/F:/nice/src/bossa/syntax Modified Files: Pattern.java Log Message: Make it possible to dispatch on @true and @false without the '@'. Index: Pattern.java =================================================================== RCS file: /cvsroot/nice/Nice/src/bossa/syntax/Pattern.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** Pattern.java 25 Feb 2003 12:30:56 -0000 1.40 --- Pattern.java 25 Feb 2003 19:52:35 -0000 1.41 *************** *** 68,88 **** this.location = location; ! if (tc != null) { ! String ident = tc.getName().toString(); ! if (ident.equals("true")) { ! this.atValue = new IdentExp(tc.getName()); this.typeConstructor = new TypeIdent(new LocatedString("boolean",location)); } ! else if (ident.equals("false")) { this.atValue = new IdentExp(tc.getName()); this.typeConstructor = new TypeIdent(new LocatedString("boolean",location)); ! } } ! else if (atValue != null && atValue instanceof ConstantExp) { this.atIntValue = true; --- 68,94 ---- this.location = location; ! if(tc == null && atValue == null && name != null) { ! String ident = name.toString(); ! if (ident.equals("true") || ident.equals("false")) { ! this.atValue = new IdentExp(name); ! this.name = null; this.typeConstructor = new TypeIdent(new LocatedString("boolean",location)); } ! } ! else if (tc != null) ! { ! String ident = tc.getName().toString(); ! if (ident.equals("true") || ident.equals("false")) { this.atValue = new IdentExp(tc.getName()); this.typeConstructor = new TypeIdent(new LocatedString("boolean",location)); ! } } ! ! if (atValue != null && atValue instanceof ConstantExp) { this.atIntValue = true; |