@Override protected void reportWarning(SourcePosition location, String message) { this.reporter.warning( message, location.source.name, location.line + 1, location.column); } }
@Override public void reportWarning(SourcePosition location, String message) { this.reporter.warning( message, location.source.name, location.line + 1, location.column); } }
@Override public void warning(String message, String sourceName, int line, int lineOffset) { warnings.add(new RhinoError(message, sourceName, line, lineOffset)); delegateReporter.warning(message, sourceName, line, lineOffset); }
@Override public void warning(String message, String sourceName, int line, int lineOffset) { warnings.add(new RhinoError(message, sourceName, line, lineOffset)); delegateReporter.warning(message, sourceName, line, lineOffset); }
private void addTypeWarning(String messageId, int lineno, int charno) { errorReporter.warning( "Bad type annotation. " + SimpleErrorReporter.getMessage0(messageId) + BAD_TYPE_WIKI_LINK, getSourceName(), lineno, charno); }
private void replay(AbstractCompiler compiler, ParseResult result) { ErrorReporter reporter = compiler.getDefaultErrorReporter(); for (RhinoError error : result.errors) { reporter.error(error.message, error.sourceName, error.line, error.lineOffset); } for (RhinoError warning : result.warnings) { reporter.warning(warning.message, warning.sourceName, warning.line, warning.lineOffset); } }
private void addNewWarning(String messageId, String messageArg, Node nodeWarning) { // TODO(lpino): Use the exact lineno and charno, it is currently using // the lineno and charno of the parent @template // TODO(lpino): Use only constants as parameters of this method errorReporter.warning( "Bad type annotation. " + SimpleErrorReporter.getMessage1(messageId, messageArg), sourceFile.getName(), templateLineno, templateCharno); }
private void replay(AbstractCompiler compiler, ParseResult result) { ErrorReporter reporter = compiler.getDefaultErrorReporter(); for (RhinoError error : result.errors) { reporter.error(error.message, error.sourceName, error.line, error.lineOffset); } for (RhinoError warning : result.warnings) { reporter.warning(warning.message, warning.sourceName, warning.line, warning.lineOffset); } }
private void addTypeWarning(String messageId, int lineno, int charno) { errorReporter.warning( "Bad type annotation. " + SimpleErrorReporter.getMessage0(messageId), getSourceName(), lineno, charno); }
private void addTypeWarning(String messageId, String messageArg, int lineno, int charno) { errorReporter.warning( "Bad type annotation. " + SimpleErrorReporter.getMessage1(messageId, messageArg) + BAD_TYPE_WIKI_LINK, getSourceName(), lineno, charno); }
private void addTypeWarning(String messageId, String messageArg, int lineno, int charno) { errorReporter.warning( "Bad type annotation. " + SimpleErrorReporter.getMessage1(messageId, messageArg), getSourceName(), lineno, charno); }
private void addParserWarning(String messageId, int lineno, int charno) { errorReporter.warning( SimpleErrorReporter.getMessage0(messageId), getSourceName(), lineno, charno); }
private void addParserWarning(String messageId, String messageArg, int lineno, int charno) { errorReporter.warning( SimpleErrorReporter.getMessage1(messageId, messageArg), getSourceName(), lineno, charno); }
void maybeWarnEs6Feature(ParseTree node, Feature feature) { features = features.require(feature); if (!isEs6Mode()) { errorReporter.warning( "this language feature is only supported in es6 mode: " + feature, sourceName, lineno(node), charno(node)); } }
void maybeWarnForFeature(Node node, Feature feature) { features = features.with(feature); if (!isSupportedForInputLanguageMode(feature)) { errorReporter.warning( languageFeatureWarningMessage(feature), sourceName, node.getLineno(), node.getCharno()); } }
void maybeWarnForFeature( com.google.javascript.jscomp.parsing.parser.Token token, Feature feature) { features = features.with(feature); if (!isSupportedForInputLanguageMode(feature)) { errorReporter.warning( languageFeatureWarningMessage(feature), sourceName, lineno(token), charno(token)); } }
void maybeWarnForFeature(ParseTree node, Feature feature) { features = features.with(feature); if (!isSupportedForInputLanguageMode(feature)) { errorReporter.warning( languageFeatureWarningMessage(feature), sourceName, lineno(node), charno(node)); } }
void maybeWarnTypeSyntax(ParseTree node, Feature feature) { if (config.languageMode() != LanguageMode.TYPESCRIPT) { errorReporter.warning( "type syntax is only supported in ES6 typed mode: " + feature, sourceName, lineno(node), charno(node)); } features = features.with(feature); recordTypeSyntax(node.location); }
private void maybeWarnKeywordProperty(Node node) { if (TokenStream.isKeyword(node.getString())) { features = features.require(Feature.KEYWORDS_AS_PROPERTIES); if (config.languageMode == LanguageMode.ECMASCRIPT3) { errorReporter.warning(INVALID_ES3_PROP_NAME, sourceName, node.getLineno(), node.getCharno()); } } }
private void maybeWarnKeywordProperty(Node node) { if (TokenStream.isKeyword(node.getString())) { features = features.with(Feature.KEYWORDS_AS_PROPERTIES); if (config.languageMode() == LanguageMode.ECMASCRIPT3) { errorReporter.warning(INVALID_ES3_PROP_NAME, sourceName, node.getLineno(), node.getCharno()); } } }