parseWith method

Statement parseWith()

Implementation

Statement parseWith() {
  int start = token?.startOffset??0;
  int line = token?.line??0;
  assert(token?.text == 'with');
  consume(Token.NAME);
  consume(Token.LPAREN);
  Expression exp = parseExpression();
  consume(Token.RPAREN);
  Statement body = parseStatement();
  return new WithStatement(exp, body)
    ..start = start
    ..end = endOffset
    ..line = line;
}