elaborate function

Collector elaborate(
  1. {required List<String> commands,
  2. int schema = 1}
)

Implementation

Collector elaborate({
  required List<String> commands,
  int schema = 1,
}) {
  collector = Collector();
  // interpreter = CATInterpreter(json);
  // interpreterFull = CATInterpreter(json);
  // List<String> commands = splitCommands(command);
  goCommands = <String>[];
  for (final String c in commands) {
    // interpreterFull.validateOnScheme(c, schema);
    final List<String> tokens = splitCommand(c);
    switch (tokens.first) {
      case "go":
        goCommands.add(c);
        break;
      case "paint":
        _paintAnalysis(c, schemeIndex: schema);
        break;
      case "fill_empty":
        collector.data["fillEmpty"]?.add(true);
        // collector.data["fillEmpty"]
        //     ?.add(correctCommandUseFillEmpty(command: c, schema: schema));
        break;
      case "copy":
        // var temp = correctCommandUse(command: c, schema: schema);
        const bool temp = true;
        _copyAnalysis(tokens);
        break;
      case "mirror":
        _mirrorAnalysis(c, schemeIndex: schema);
        break;
      default:
        break;
    }
    // interpreter.reset();
  }
  // print(collector);

  return collector;
}