analyze method

AST analyze()

Implementation

AST analyze() {
  final List<Stmt> stmts = [];
  while (!eof()) {
    try {
      final s = stmt();
      if (s == null) {
        continue;
      }
      stmts.add(s);
    } catch (e) {
      addError(e.toString());
      advance();
    }
  }
  return AST(stmts);
}