clauses method

  1. @override
List<CommandClause> clauses()
inherited

Implementation

@override
List<CommandClause> clauses() {
  CommandClause clause = this.clause();
  List<CommandClause> currentClauses = [];
  if (clause.type() != ClauseType.none) {
    currentClauses.add(clause);
    if (newline()) {
      currentClauses.add(CommandClause.withNewline());
    }
  }

  return [
    ...prependClause,
    ...currentClauses,
    ...appendClause,
  ];
}