skip method

void skip(
  1. ParseResult parseResult
)

This method is strictly used to skip insignificant tokens, typically whitespace, which will not end up in the actual AST.

Implementation

void skip(ParseResult parseResult) {
  if (current.tokenType != TokenType.eof()) {
    parseResult.ast.nodes.add(InsignificantASTNode()..tokens.add(current));
  }
  advance();
}