bundles/org.eclipse.orion.client.javascript/web/eslint/lib/utils/token-store.js
function lastTokenIndex(node) {
			var end = node.range[1],
				cursor = ends[end];

			// If the node extends beyond its last token, get the token before the
			// next token
			if (typeof cursor === "undefined") {
				cursor = starts[end] - 1;
			}

			// If there isn't a next token, the desired token is the last one in the
			// array
			if (isNaN(cursor)) {
				cursor = length - 1;
			}

			return cursor;
		}
function lastTokenIndex(node) {
			var end = node.range[1],
				cursor = ends[end];

			// If the node extends beyond its last token, get the token before the
			// next token
			if (typeof cursor === "undefined") {
				cursor = starts[end] - 1;
			}

			// If there isn't a next token, the desired token is the last one in the
			// array
			if (isNaN(cursor)) {
				cursor = length - 1;
			}

			return cursor;
		}
function lastTokenIndex ( node ) { var end = node . range [ 1 ] , cursor = ends [ end ] ; // If the node extends beyond its last token, get the token before the // next token if ( typeof cursor === "undefined" ) { cursor = starts [ end ] - 1 ; } // If there isn't a next token, the desired token is the last one in the // array if ( isNaN ( cursor ) ) { cursor = length - 1 ; } return cursor ; }
Gets the index in the tokens array of the last token belonging to a node.
Usually a node ends exactly at a token, but due to ASI, sometimes a
node's range extends beyond its last token.
@param {ASTNode} node The node for which to find the last token's index.
@returns {int} Index in the tokens array of the node's last token.
Gets the index in the tokens array of the last token belonging to a node . Usually a node ends exactly at a token but due to ASI sometimes a node s range extends beyond its last token .