Skip to content
This repository has been archived by the owner on Mar 23, 2024. It is now read-only.

Commit

Permalink
[Fix] Parsing errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mdevils committed Apr 14, 2016
1 parent 4517263 commit 5b6f8de
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/string-checker.js
Expand Up @@ -81,7 +81,7 @@ StringChecker.prototype = {

file.getParseErrors().forEach(function(parseError) {
if (!this._maxErrorsExceeded) {
this._addParseError(errors, parseError);
this._addParseError(errors, parseError, file);
}
}, this);

Expand Down Expand Up @@ -201,14 +201,15 @@ StringChecker.prototype = {
*
* @param {Errors} errors
* @param {Error} parseError
* @param {JsFile} file
* @private
*/
_addParseError: function(errors, parseError) {
_addParseError: function(errors, parseError, file) {
if (this._maxErrorsExceeded) {
return;
}

errors.add(parseError);
errors.add(parseError, file.getProgram());

if (this.maxErrorsEnabled()) {
this._errorsFound += 1;
Expand Down

0 comments on commit 5b6f8de

Please sign in to comment.