/src/org/ooc/frontend/model/Else.java

http://github.com/nddrylliog/ooc · Java · 31 lines · 22 code · 9 blank · 0 comment · 0 complexity · 1d884a51a2c4d662f601b589ce0a236f MD5 · raw file

  1. package org.ooc.frontend.model;
  2. import java.io.IOException;
  3. import org.ooc.frontend.Visitor;
  4. import org.ooc.frontend.model.tokens.Token;
  5. public class Else extends ControlStatement {
  6. public Else(Token startToken) {
  7. super(startToken);
  8. }
  9. @Override
  10. public boolean replace(Node oldie, Node kiddo) {
  11. return false;
  12. }
  13. public void accept(Visitor visitor) throws IOException {
  14. visitor.visit(this);
  15. }
  16. public void acceptChildren(Visitor visitor) throws IOException {
  17. body.accept(visitor);
  18. }
  19. public boolean hasChildren() {
  20. return !body.isEmpty();
  21. }
  22. }