lib/service/MicroTemplateService.js
function inToken(loc, token) {
    if (typeof loc === "number") {
        return token.range[0] <= loc && loc < token.range[1]
    }
    return locationInRangeLoc(loc, token.loc.start, token.loc.end)
}
function inToken(loc, token) {
    if (typeof loc === "number") {
        return token.range[0] <= loc && loc < token.range[1]
    }
    return locationInRangeLoc(loc, token.loc.start, token.loc.end)
}
function inToken ( loc , token ) { if ( typeof loc === "number" ) { return token . range [ 0 ] <= loc && loc < token . range [ 1 ] } return locationInRangeLoc ( loc , token . loc . start , token . loc . end ) }
Check whether the location is in token.
@param {object|number} loc The location or index.
@param {object} token The token.
@returns {boolean} `true` if the location is in token.
Check whether the location is in token .