skipWhitespace method

void skipWhitespace()

Skip until we've left whitespace. Does nothing if we're not in whitespace.

Implementation

void skipWhitespace() {
	skipUntil(() {
		// check for all whitespace characters
		for (var whitespace in whitespaceChars) {
			// if we find one
			if (matches(whitespace)) {
				// continue
				return whitespace.length;
			}
		}
		// if we encounter any other character, return 0 to break without skipping it
		return 0;
	}, true);
}