parseBlock method

BlockStatement parseBlock()

/// STATEMENTS /////

Implementation

BlockStatement parseBlock() {
  int start = token?.startOffset??0;
  int line = token?.line??0;
  consume(Token.LBRACE);
  List<Statement> list = <Statement>[];
  while (token?.type != Token.RBRACE) {
    list.add(parseStatement());
  }
  consume(Token.RBRACE);
  int lineCount = lexer!.getLineCount(start, endOffset) + line - 1;
  return new BlockStatement(list)
    ..start = start
    ..end = endOffset
    ..line = line
    ..endLine = lineCount;
}