isSimple method

bool isSimple()

Whether the Statement has no additional properties.

If true, it means the StatementType does not require an editor widget, as there would be nothing to edit.

Simple statements can directly be added to the program.

BreakStatement and ContinueStatement are considered simple statements.

Implementation

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