Changeset 2312
- Timestamp:
- 07/19/08 03:35:34 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ProjectFortress/astgen/Fortress.ast
r2278 r2312 708 708 709 709 /** 710 * Template gap for expressions711 */712 // TemplateGapExpr(Id id, List<Id> templateParams) implements TemplateGap;713 /**714 710 * expression annotated with a type 715 711 */ … … 745 741 */ 746 742 abstract DelimitedExpr(); 747 /**748 * Template gap for expressions749 */750 // TemplateGapDelimitedExpr(Id id, List<Id> templateParams) implements TemplateGap;751 743 /** 752 744 * sequence of block elements implicitly enclosed by do/end … … 978 970 Expr body) 979 971 implements Applicable; 980 /**981 * Template gap for FnExpr982 */983 // TemplateGapFnExpr(Id id, List<Id> templateParams) implements TemplateGap;984 972 /** 985 973 * expression used in block expressions … … 1027 1015 abstract SimpleExpr(); 1028 1016 /** 1029 * Template gap for simple expressions1030 */1031 // TemplateGapSimpleExpr(Id id, List<Id> templateParams) implements TemplateGap;1032 /**1033 1017 * subscripting expression 1034 1018 * SubscriptExpr ::= Primary LeftEncloser ExprList? RightEncloser … … 1045 1029 abstract Primary(); 1046 1030 /** 1047 * Template gap for primary expressions1048 */1049 // TemplateGapPrimary(Id id, List<Id> templateParams) implements TemplateGap;1050 /**1051 1031 * literal 1052 1032 * Primary ::= LiteralExpr … … 1054 1034 abstract LiteralExpr(String text); 1055 1035 /** 1056 * Template gap for literal expressiont1057 */1058 // TemplateGapLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1059 /**1060 1036 * number literal 1061 1037 */ 1062 1038 abstract NumberLiteralExpr(); 1063 /**1064 * Template gap for number literals1065 */1066 // TemplateGapNumberLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1067 1039 /** 1068 1040 * float literal … … 1073 1045 BigInteger numerator, int denomBase, 1074 1046 int denomPower); 1075 /**1076 * Template gap for float literals1077 */1078 // TemplateGapFloatLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1079 1047 /** 1080 1048 * int literal … … 1083 1051 IntLiteralExpr(String text = in_val.toString(), 1084 1052 BigInteger val); 1085 /**1086 * Template gap for int literals1087 */1088 // TemplateGapIntLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1089 1053 /** 1090 1054 * char literal … … 1092 1056 */ 1093 1057 CharLiteralExpr(int val = in_text.charAt(0)); 1094 /**1095 * Template gap for char literals1096 */1097 // TemplateGapCharLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1098 1058 /** 1099 1059 * string literal … … 1101 1061 */ 1102 1062 StringLiteralExpr(); 1103 /**1104 * Template gap for string literals1105 */1106 // TemplateGapStringLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1107 1063 /** 1108 1064 * void literal … … 1110 1066 */ 1111 1067 VoidLiteralExpr(String text = ""); 1112 /**1113 * Template gap for void literals1114 */1115 // TemplateGapVoidLiteralExpr(Id id, List<Id> templateParams) implements TemplateGap;1116 1068 /** 1117 1069 * variable reference … … 1176 1128 _RewriteFnRef(Expr fn, 1177 1129 List<StaticArg> staticArgs 1178 = Collections.<StaticArg>emptyList());1130 = Collections.<StaticArg>emptyList()); 1179 1131 /** 1180 1132 * operator name with (inferred) static instantiations … … 1211 1163 */ 1212 1164 LooseJuxt(); 1213 /**1214 * Template gap for expressions1215 */1216 // TemplateGapLooseJuxt(Id id, List<Id> templateParams) implements TemplateGap;1217 1165 /** 1218 1166 * juxtaposition without intervening whitespace … … 1242 1190 OpExpr(OpRef op, 1243 1191 List<Expr> args = Collections.<Expr>emptyList()); 1244 1192 1245 1193 /** 1246 1194 * If an expression uses and operator, and that operator … … 1249 1197 * unclear until typechecking and overloading resolution 1250 1198 * whether it should be one multifix application or several 1251 * infix applications. 1199 * infix applications. 1252 1200 * 1253 1201 * e.g.) 3+4+5+6 1254 1202 */ 1255 1203 AmbiguousMultifixOpExpr(OpRef infix_op, OpRef multifix_op, 1256 List<Expr> args = Collections.<Expr>emptyList()); 1257 1204 List<Expr> args = Collections.<Expr>emptyList()); 1205 1258 1206 /** 1259 1207 * chain expression … … 2003 1951 abstract Name(); 2004 1952 /** 2005 * Template gap for names2006 */2007 // TemplateGapName(Id id, List<Id> templateParams) implements TemplateGap;2008 /**2009 1953 * unstructured sequence of ids naming an API or component 2010 1954 * Names in the list must be unqualified. … … 2032 1976 */ 2033 1977 Id(String text); 2034 /**2035 * Template gap for expressions2036 */2037 // TemplateGapId(Id id, List<Id> templateParams) implements TemplateGap;2038 1978 /** 2039 1979 * operator name trunk/ProjectFortress/src/com/sun/fortress/nodes_util/ErrorMsgMaker.java
r2109 r2312 139 139 } 140 140 141 142 141 public String forId(Id node) { 143 142 return NodeUtil.nameString(node); … … 194 193 public String forVarRef(VarRef node) { 195 194 return NodeUtil.nameString(node.getVar()); 195 } 196 197 public String for_RewriteObjectRef(_RewriteObjectRef node) { 198 List<StaticArg> sargs = node.getStaticArgs(); 199 return forId(node.getObj()) + 200 (sargs.size() > 0 ? Useful.listInOxfords(sargs) : ""); 201 } 202 203 public String forFieldRef(FieldRef node) { 204 return node.getObj().accept(this) + "." + forId(node.getField()); 205 } 206 207 public String for_RewriteFieldRef(FieldRef node) { 208 return node.getObj().accept(this) + "." + forName(node.getField()); 209 } 210 211 public String forFnRef(FnRef node) { 212 List<StaticArg> sargs = node.getStaticArgs(); 213 return forId(node.getOriginalName()) + 214 (sargs.size() > 0 ? Useful.listInOxfords(sargs) : ""); 215 } 216 217 public String for_RewriteFnRef(_RewriteFnRef node) { 218 List<StaticArg> sargs = node.getStaticArgs(); 219 return node.getFn().accept(this) + 220 (sargs.size() > 0 ? Useful.listInOxfords(sargs) : ""); 221 } 222 223 public String forOpRef(OpRef node) { 224 List<StaticArg> sargs = node.getStaticArgs(); 225 return forName(node.getOriginalName()) + 226 (sargs.size() > 0 ? Useful.listInOxfords(sargs) : ""); 196 227 } 197 228
