Reports an unnecessary semicolon error.
@param {Node|Token} nodeOrToken - A node or a token to be reported.
@returns {void}
195572
function report(nodeOrToken) {
            context.report({
                node: nodeOrToken,
                messageId: "unexpected",
                fix(fixer) {

                    /*
                     * Expand the replacement range to include the surrounding
                     * tokens to avoid conflicting with semi.
                     * https://github.com/eslint/eslint/issues/7928
                     */
                    return new FixTracker(fixer, context.getSourceCode())
                        .retainSurroundingTokens(nodeOrToken)
                        .remove(nodeOrToken);
                }
            });
        }
295456
function reportNoBeginningSpace (node, token) {
      context.report(node, token.loc.start,
        "There should be no space after '" + token.value + "'")
    }
672678
function toExpr(value,line){
	var token=[];
	var ctoken=token;
	var newToken;
	var stacks=[];
	var c;
	var ss='';
	for(var i=0;i<value.length;i++){
		c=value[i];
		switch(c){
		case ' ':
		case "\t":
		case ",":
			if(ss!=""){
				ctoken.push(ss);
				ss="";
			}
			break;
		case '(':
			if(ss!=""){
				console.log("warning: no space before '(' in line "+line+" at "+(i+1));
				ctoken.push(ss);
				ss="";
			}
			stacks.push(ctoken);
			newToken=[];
			ctoken.push(newToken);
			ctoken=newToken;
			break;
		case ')':
			if(ss!=""){
				ctoken.push(ss);
				ss="";
			}
			if(stacks.length>0){
				ctoken=stacks.pop();
			}else{
				console.log("error: unmatched ')' in line "+line+" at "+(i+1));
				return null;
			}
			break;
		default:
			ss+=c;
			break;
		}
	}
	if(ss!=''){
		ctoken.push(ss);
	}

	// remove last '*/', '###'
	var ltoken=null;
	if(token&&(token.length>0)){
		ltoken=token[token.length-1];
		if((typeof ltoken=='string')&&((ltoken=='*/')||(ltoken=='###'))){
			ltoken.pop();
		}
	}

	return token;
}
1101711
function checkForSemicolonForVariableDeclaration(node) {
            const parent = node.parent;

            if ((parent.type !== "ForStatement" || parent.init !== node) &&
                (!/^For(?:In|Of)Statement/u.test(parent.type) || parent.left !== node)
            ) {
                checkForSemicolon(node);
            }
        }
563574
function checkConditional(node) {
            const nonSpacedConsequesntNode = getFirstNonSpacedToken(node.test, node.consequent, "?");
            const nonSpacedAlternateNode = getFirstNonSpacedToken(node.consequent, node.alternate, ":");

            if (nonSpacedConsequesntNode) {
                report(node, nonSpacedConsequesntNode);
            } else if (nonSpacedAlternateNode) {
                report(node, nonSpacedAlternateNode);
            }
        }
671769
function check(semiToken, expected) {
            const prevToken = sourceCode.getTokenBefore(semiToken);
            const nextToken = sourceCode.getTokenAfter(semiToken);
            const prevIsSameLine = !prevToken || astUtils.isTokenOnSameLine(prevToken, semiToken);
            const nextIsSameLine = !nextToken || astUtils.isTokenOnSameLine(semiToken, nextToken);

            if ((expected === "last" && !prevIsSameLine) || (expected === "first" && !nextIsSameLine)) {
                context.report({
                    loc: semiToken.loc,
                    message: "Expected this semicolon to be at {{pos}}.",
                    data: {
                        pos: (expected === "last")
                            ? "the end of the previous line"
                            : "the beginning of the next line"
                    },
                    fix(fixer) {
                        if (prevToken && nextToken && sourceCode.commentsExistBetween(prevToken, nextToken)) {
                            return null;
                        }

                        const start = prevToken ? prevToken.range[1] : semiToken.range[0];
                        const end = nextToken ? nextToken.range[0] : semiToken.range[1];
                        const text = (expected === "last") ? ";\n" : "\n;";

                        return fixer.replaceTextRange([start, end], text);
                    }
                });
            }
        }
1025802
function isRemovedToken(context, token) {
  var removedNodes = context.removedNodes;
  var nodeIdx = removedNodes.length - 1;

  // Find the last removed node which could possibly contain this token.
  while (nodeIdx >= 0 && startOf(removedNodes[nodeIdx]) > startOf(token)) {
    nodeIdx--;
  }

  var node = removedNodes[nodeIdx];

  // This token couldn't be removed if not contained within the removed node.
  if (nodeIdx === -1 || endOf(node) < endOf(token)) {
    return false;
  }

  // Iterate through the tokens contained by the removed node to find a match.
  var tokens = context.ast.tokens;
  var tokenIdx = findTokenIndex(tokens, startOf(node));
  while (endOf(tokens[tokenIdx]) <= endOf(node)) {
    if (token === tokens[tokenIdx]) {
      return true;
    }
    tokenIdx++;
  }

  return false;
}
303058
function checkSemicolonSpacing(token, node) {
            if (astUtils.isSemicolonToken(token)) {
                const location = token.loc.start;

                if (hasLeadingSpace(token)) {
                    if (!requireSpaceBefore) {
                        context.report({
                            node,
                            loc: location,
                            message: "Unexpected whitespace before semicolon.",
                            fix(fixer) {
                                const tokenBefore = sourceCode.getTokenBefore(token);

                                return fixer.removeRange([tokenBefore.range[1], token.range[0]]);
                            }
                        });
                    }
                } else {
                    if (requireSpaceBefore) {
                        context.report({
                            node,
                            loc: location,
                            message: "Missing whitespace before semicolon.",
                            fix(fixer) {
                                return fixer.insertTextBefore(token, " ");
                            }
                        });
                    }
                }

                if (!isFirstTokenInCurrentLine(token) && !isLastTokenInCurrentLine(token) && !isBeforeClosingParen(token)) {
                    if (hasTrailingSpace(token)) {
                        if (!requireSpaceAfter) {
                            context.report({
                                node,
                                loc: location,
                                message: "Unexpected whitespace after semicolon.",
                                fix(fixer) {
                                    const tokenAfter = sourceCode.getTokenAfter(token);

                                    return fixer.removeRange([token.range[1], tokenAfter.range[0]]);
                                }
                            });
                        }
                    } else {
                        if (requireSpaceAfter) {
                            context.report({
                                node,
                                loc: location,
                                message: "Missing whitespace after semicolon.",
                                fix(fixer) {
                                    return fixer.insertTextAfter(token, " ");
                                }
                            });
                        }
                    }
                }
            }
        }
1346470
private void checkForTokens( String content, int startOffset, int endOffset ) {
        while( startOffset <= endOffset ) {
            // skip the delimiters to find the start of a new token
            while( isDelimiter(content.substring(startOffset, startOffset + 1)) ) {
                if (startOffset < endOffset)
                    startOffset++;
                else
                    return;
            }
            // Extract and process the entire token
            if (isQuoteDelimiter(content.substring(startOffset, startOffset + 1)))
                startOffset = getQuoteToken(content, startOffset, endOffset);
            else
                startOffset = getOtherToken(content, startOffset, endOffset);
        }
    }
527261
function checkSpacing(node) {
            const tagToken = sourceCode.getTokenBefore(node.quasi);
            const literalToken = sourceCode.getFirstToken(node.quasi);
            const hasWhitespace = sourceCode.isSpaceBetweenTokens(tagToken, literalToken);

            if (never && hasWhitespace) {
                context.report({
                    node,
                    loc: tagToken.loc.start,
                    messageId: "unexpected",
                    fix(fixer) {
                        const comments = sourceCode.getCommentsBefore(node.quasi);

                        // Don't fix anything if there's a single line comment after the template tag
                        if (comments.some(comment => comment.type === "Line")) {
                            return null;
                        }

                        return fixer.replaceTextRange(
                            [tagToken.range[1], literalToken.range[0]],
                            comments.reduce((text, comment) => text + sourceCode.getText(comment), "")
                        );
                    }
                });
            } else if (!never && !hasWhitespace) {
                context.report({
                    node,
                    loc: tagToken.loc.start,
                    messageId: "missing",
                    fix(fixer) {
                        return fixer.insertTextAfter(tagToken, " ");
                    }
                });
            }
        }
1101970
function scanJsxToken() {
  skipComments();
  let beginIndex = index;
  switch (currentCharCode) {
    case 34:  // "
    case 39:  // '
      return scanJsxStringLiteral(beginIndex, currentCharCode);
    case 62:  // >
      next();
      return createToken(CLOSE_ANGLE, beginIndex);
    // case 123:  // {
    // case 125:  // }
  }

  if (!isIdentifierStart(currentCharCode)) {
    return scanToken();
  }
  next();
  while (isIdentifierPart(currentCharCode) || currentCharCode === 45) {  // '-'
    next();
  }
  let value = input.slice(beginIndex, index);
  return new JsxIdentifierToken(getTokenRange(beginIndex), value);
}
4432
function report(node) {
            context.report({ node, messageId: "unexpected", data: { operator: node.operator } });
        }
935477
function checkLiteral(node) {
            const token = sourceCode.getFirstToken(node),
                nodeType = token.type,
                nodeValue = token.value;

            if (nodeType === "RegularExpression") {
                checkRegex(node, nodeValue, token.range[0]);
            }
        }
147438
function(node) {
			// 1 * foo
			var nonNumericOperand = options.number && isMultiplyByOne(node) && getNonNumericOperand(node);
			if (nonNumericOperand) {
				context.report(
					node,
					ProblemMessages.noImplicitCoercionNumber,
					{
						code: context.getSource(nonNumericOperand)
					});
			}

			// "" + foo
			if (options.string && isConcatWithEmptyString(node)) {
				context.report(
					node,
					ProblemMessages.noImplicitCoercionString,
					{
						code: context.getSource(getOtherOperand(node, ""))
					});
			}
		}
718106
function isActuallyCombinator(combinatorNode) {
  // `.foo  /*comment*/, .bar`
  //      ^^
  // If include comments, this spaces is a combinator, but it is not combinators.
  if (!/^\s+$/.test(combinatorNode.value)) {
    return true;
  }

  let next = combinatorNode.next();

  while (skipTest(next)) {
    next = next.next();
  }

  if (isNonTarget(next)) {
    return false;
  }

  let prev = combinatorNode.prev();

  while (skipTest(prev)) {
    prev = prev.prev();
  }

  if (isNonTarget(prev)) {
    return false;
  }

  return true;

  function skipTest(node) {
    if (!node) {
      return false;
    }

    if (node.type === "comment") {
      return true;
    }

    if (node.type === "combinator" && /^\s+$/.test(node.value)) {
      return true;
    }

    return false;
  }

  function isNonTarget(node) {
    if (!node) {
      return true;
    }

    if (node.type === "combinator" && !/^\s+$/.test(node.value)) {
      return true;
    }

    return false;
  }
}
149590
function checkSpacingForForOfStatement(node) {
            if (node.await) {
                checkSpacingBefore(sourceCode.getFirstToken(node, 0));
                checkSpacingAfter(sourceCode.getFirstToken(node, 1));
            } else {
                checkSpacingAroundFirstToken(node);
            }
            checkSpacingAround(sourceCode.getTokenBefore(node.right, astUtils.isNotOpeningParenToken));
        }
337462
function processNonSpecifier() {
                    const secondToken = sourceCode.getFirstToken(node, 1)
                    if (isLeftBrace(secondToken)) {
                        setOffsetToToken(
                            [
                                secondToken,
                                sourceCode.getTokenAfter(secondToken),
                            ],
                            0,
                            importToken
                        )
                        tokens.push(
                            sourceCode.getLastToken(node, hasSemi ? 2 : 1), // from
                            sourceCode.getLastToken(node, hasSemi ? 1 : 0) // "foo"
                        )
                    } else {
                        tokens.push(
                            sourceCode.getLastToken(node, hasSemi ? 1 : 0)
                        )
                    }
                }