rules/indent.js
function isFirstTokenOfStatement(token, leafNode) {
            let node = leafNode;

            while (node.parent && !node.parent.type.endsWith("Statement") && !node.parent.type.endsWith("Declaration")) {
                node = node.parent;
            }
            node = node.parent;

            return !node || node.range[0] === token.range[0];
        }
function isFirstTokenOfStatement(token, leafNode) {
            let node = leafNode;

            while (node.parent && !node.parent.type.endsWith("Statement") && !node.parent.type.endsWith("Declaration")) {
                node = node.parent;
            }
            node = node.parent;

            return !node || node.range[0] === token.range[0];
        }
function isFirstTokenOfStatement ( token , leafNode ) { let node = leafNode ; while ( node . parent && ! node . parent . type . endsWith ( "Statement" ) && ! node . parent . type . endsWith ( "Declaration" ) ) { node = node . parent ; } node = node . parent ; return ! node || node . range [ 0 ] === token . range [ 0 ] ; }
Check whether the given token is the first token of a statement.
@param {Token} token The token to check.
@param {ASTNode} leafNode The expression node that the token belongs directly.
@returns {boolean} `true` if the token is the first token of a statement.
Check whether the given token is the first token of a statement .