parseThrow method

Statement parseThrow()

Implementation

Statement parseThrow() {
  int start = token?.startOffset??0;
  int line = token?.line??0;
  assert(token?.text == 'throw');
  consume(Token.NAME);
  Expression exp = parseExpression();
  consumeSemicolon();
  return new ThrowStatement(exp)
    ..start = start
    ..end = endOffset
    ..line = line;
}