parse method

List<AstNode> parse(
  1. List<Token> tokens
)

Implementation

List<AstNode> parse(List<Token> tokens) {
  reset();
  this.tokens = tokens;
  List<AstNode> statements = [];
  while (!isAtEnd()) {
    statements.add(declaration());
  }
  return statements;
}