| | 233 | public static abstract class HelperAst { |
| | 234 | public final int start; |
| | 235 | public final int end; |
| | 236 | |
| | 237 | public HelperAst(HelperAst ast) { |
| | 238 | this(ast.start, ast.end); |
| | 239 | } |
| | 240 | |
| | 241 | public HelperAst(int start, int end) { |
| | 242 | this.start = start; |
| | 243 | this.end = end; |
| | 244 | } |
| | 245 | |
| | 246 | public boolean equals(Object obj) { |
| | 247 | if (null == obj) return false; |
| | 248 | if (this == obj) return true; |
| | 249 | if (obj.getClass().equals(this.getClass())){ |
| | 250 | HelperAst other = (HelperAst) obj; |
| | 251 | return start == other.start |
| | 252 | && end == other.end; |
| | 253 | } |
| | 254 | return super.equals(obj); |
| | 255 | } |
| | 256 | |
| | 257 | public String toString() { |
| | 258 | return "helper ast: "+start+":"+end; |
| | 259 | } |
| | 260 | } |