(ASTree tree)
| 178 | throw new StoneException("bad expression statement", this); |
| 179 | } |
| 180 | protected static boolean isExprStmnt(ASTree tree) { |
| 181 | if (tree instanceof BinaryExpr) |
| 182 | return "=".equals(((BinaryExpr)tree).operator()); |
| 183 | return tree instanceof PrimaryExpr || tree instanceof VarStmnt; |
| 184 | } |
| 185 | protected static boolean isControlStmnt(ASTree tree) { |
| 186 | return tree instanceof BlockStmnt || tree instanceof IfStmnt |
| 187 | || tree instanceof WhileStmnt; |
no test coverage detected