$expandVar method

String $expandVar(
  1. int start,
  2. int amount
)

Used by generated code to expand array variables.

Implementation

String $expandVar(int start, int amount) {
  final compiler = dialect.createCompiler();

  for (var x = 0; x < amount; x++) {
    compiler.addPositionalVariable(1 + start + x);

    if (x != amount - 1) {
      compiler.statement.comma();
    }
  }

  return compiler.statement.buffer.toString();
}