isSimple method

bool isSimple()

If true, the statement has no extra properties and thus does not require editing. Examples include "break" and "continue" statements, which should be instantly added to the canvas without opening an extra editor.

Implementation

bool isSimple() {
  switch (this) {
    case StatementType.breakStatement:
    case StatementType.continueStatement:
      return true;
    default:
      return false;
  }
}