MCPcopy Create free account
hub / github.com/chibash/stone / isExprStmnt

Method isExprStmnt

src/chap14/ToJava.java:180–184  ·  view source on GitHub ↗
(ASTree tree)

Source from the content-addressed store, hash-verified

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;

Callers 1

translateStmntMethod · 0.95

Calls 1

operatorMethod · 0.80

Tested by

no test coverage detected