parseBlock method

BlockStatement parseBlock()

/// STATEMENTS /////

Implementation

BlockStatement parseBlock() {
  int? start = token!.startOffset;
  int? line = token!.line;
  consume(Token.LBRACE);
  List<Statement> list = <Statement>[];
  while (token!.type != Token.RBRACE) {
    list.add(parseStatement());
  }
  consume(Token.RBRACE);
  return BlockStatement(list)
    ..start = start
    ..end = endOffset
    ..line = line;
}