block method

Block block()

Implementation

Block block() {
  List<AstNode> statements = [];
  while (!check(TokenType.rightBrace) && !isAtEnd()) {
    statements.add(declaration());
  }
  consume(TokenType.rightBrace, "Expect '}' after block.");
  return Block(statements);
}