function onToken( token ) {
		// Ignore placeholders & EOF tokens:
		if ( token.start >= token.end ) {
			return;
		}
		if ( token.type.isLoop || isControlKeyword( token.type.keyword ) || ( token.type.label === 'name' && isUnrecognizedControlKeyword( token.value ) ) ) {
			// Control flow keywords - `for`, `while`, `do`, `if`, `else` etc:
			token.type = 'control';
			tokens.push( token );
			return;
		}
		if ( isSpecialIdentifier( token.type.keyword ) ) {
			// Special identifiers - `this`, `super`:
			token.type = 'specialIdentifier';
			tokens.push( token );
			return;
		}
		if ( isReservedLiteral( token.type.keyword ) ) {
			// Built-in literals - `true`, `false`, `null`, `undefined`:
			token.type = 'literal';
			tokens.push( token );
			return;
		}
		if ( token.type.keyword || ( token.type.label === 'name' && isUnrecognizedKeyword( token.value ) ) ) {
			// Keywords - `function`, `import`, `var`, `const`, `let` etc.:
			token.type = 'keyword';
			tokens.push( token );
			return;
		}
		if ( isStringTokenType( token.type.label ) ) {
			// Strings and template string literals:
			token.type = 'string';
			tokens.push( token );
			return;
		}
		if ( token.type.label === 'regexp' ) {
			// Regex expressions:
			token.type = 'regexp';
			tokens.push( token );
			return;
		}
		if ( token.type.label === 'num' ) {
			// Numeric literals:
			token.type = 'number';
			tokens.push( token );
			return;
		}
		if ( token.type.binop || token.type.prefix || token.type.postfix || token.type.isAssign ) { // eslint-disable-line max-len
			// Operator symbols - `+`, `=`, `++` etc:
			token.type = 'operator';
			tokens.push( token );
			return;
		}
		if ( RE_PUNCTUATION.test( token.type.label ) ) {
			// Punctuation symbols - `,`, `(`, `;` etc:
			token.value = token.type.label;
			token.type = 'punctuation';
			tokens.push( token );
		}
	}
Callback invoked upon encountering a `Token` when parsing.

@private
@param {Object} token - token object