Changeset 3572
- Timestamp:
- Mar 25, 2008, 7:06:31 PM (13 years ago)
- Location:
- devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstAlt.java
r3570 r3572 36 36 StringBuffer strBuf = new StringBuffer(); 37 37 strBuf.append(failMode.select("\\{", "{") + (sentenceList.length == 0 ? "" : " ")); 38 for (AstSentence sentence : sentenceList) { 39 String str = sentence.toString(); 40 strBuf.append((str.length() == 0 ? "" : str + " ") + "; "); 41 } 38 for (AstSentence sentence : sentenceList) 39 strBuf.append(sentence + " ; "); 42 40 strBuf.append("}"); 43 41 return strBuf.toString(); -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstConstBinding.java
r3570 r3572 31 31 @Override 32 32 public String toString () { 33 return (isPublic ? "$public " : "") + "$const " + name+ " = " + expr + ";";33 return (isPublic ? "$public " : "") + "$const " + AstName.toString(name) + " = " + expr + ";"; 34 34 } 35 35 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstError.java
r3570 r3572 24 24 @Override 25 25 public String toString () { 26 String str = sentence.toString(); 27 return "$error" + (str.length() == 0 ? "" : " " + str); 26 return "$error " + sentence; 28 27 } 29 28 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstFormat.java
r3570 r3572 24 24 @Override 25 25 public String toString () { 26 String str = expr.toString(); 27 return "::" + (str.length() == 0 ? "" : " " + str); 26 return (":: " + expr).trim(); 28 27 } 29 28 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstFuncDecl.java
r3570 r3572 48 48 @Override 49 49 public String toString () { 50 return (isPublic ? "$public " : "") + retMode.select("$func? ", "$func ") + name+ " " + inFormat + " = " + outFormat + ";";50 return (isPublic ? "$public " : "") + retMode.select("$func? ", "$func ") + AstName.toString(name) + " " + inFormat + " = " + outFormat + ";"; 51 51 } 52 52 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstFuncDef.java
r3570 r3572 34 34 @Override 35 35 public String toString () { 36 String str = body.toString(); 37 return name + (str.length() == 0 ? "" : " " + str + " ") + ";"; 36 return name + " " + body + " ;"; 38 37 } 39 38 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstIter.java
r3570 r3572 26 26 @Override 27 27 public String toString () { 28 String str1 = sentence.toString(); 29 String str2 = target.toString(); 30 return "$iter" + (str1.length() == 0 ? "" : " " + str1) + " ::" + (str2.length() == 0 ? "" : " " + str2); 28 return ("$iter " + sentence + " :: " + target).trim(); 31 29 } 32 30 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstName.java
r3570 r3572 30 30 return isIdenifier() ? identifier : "\"" + identifier + "\""; 31 31 } 32 33 public static String toString (AstName astName) { 34 return astName == null ? "$NONAME$" : astName.toString(); 35 } 32 36 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstNative.java
r3570 r3572 30 30 @Override 31 31 public String toString () { 32 return "$native " + left + " = " + right+ ";";32 return "$native " + left + " = " + AstName.toString(right) + ";"; 33 33 } 34 34 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstNot.java
r3570 r3572 24 24 @Override 25 25 public String toString () { 26 return ("# " + sentence).trim();26 return "# " + sentence; 27 27 } 28 28 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstObjDecl.java
r3570 r3572 35 35 @Override 36 36 public String toString () { 37 return (isPublic ? "$public " : "") + "$" + kind.name().toLowerCase() + " " + name+ ";";37 return (isPublic ? "$public " : "") + "$" + kind.name().toLowerCase() + " " + AstName.toString(name) + ";"; 38 38 } 39 39 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstSentence.java
r3570 r3572 30 30 flag = true; 31 31 } 32 return strBuf.toString() .trim();32 return strBuf.toString(); 33 33 } 34 34 } -
devel-tools/trunk/eclipse/org.refal.rfpdt.core/src/org/refal/rfpdt/ast/AstTrap.java
r3570 r3572 26 26 @Override 27 27 public String toString () { 28 return (("$trap " + trySentence).trim() + " $with " + catchSentence).trim();28 return "$trap " + trySentence + " $with " + catchSentence; 29 29 } 30 30 }
Note: See TracChangeset
for help on using the changeset viewer.