skipWhitespaceAndComment method

void skipWhitespaceAndComment()

Implementation

void skipWhitespaceAndComment() {
  while (!atEnd && isWhitespace(input[position])) {
    position++;
  }

  if (position < input.length - 1 &&
      input[position] == '/' &&
      input[position + 1] == '/') {
    // Comment.  Skip to end of line.
    position += 2;
    while (!atEnd && input[position] != '\n') {
      position++;
    }
  }
}