index method

Expression index(
  1. Expression index
)
inherited

Returns accessing the index operator ([]) on this.

Implementation

Expression index(Expression index) => BinaryExpression._(
  expression,
  CodeExpression(Block.of([const Code('['), index.code, const Code(']')])),
  '',
);