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

Commit 5b6f8de

Browse files
committed
[Fix] Parsing errors
1 parent 4517263 commit 5b6f8de

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

lib/string-checker.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ StringChecker.prototype = {
8181

8282
file.getParseErrors().forEach(function(parseError) {
8383
if (!this._maxErrorsExceeded) {
84-
this._addParseError(errors, parseError);
84+
this._addParseError(errors, parseError, file);
8585
}
8686
}, this);
8787

@@ -201,14 +201,15 @@ StringChecker.prototype = {
201201
*
202202
* @param {Errors} errors
203203
* @param {Error} parseError
204+
* @param {JsFile} file
204205
* @private
205206
*/
206-
_addParseError: function(errors, parseError) {
207+
_addParseError: function(errors, parseError, file) {
207208
if (this._maxErrorsExceeded) {
208209
return;
209210
}
210211

211-
errors.add(parseError);
212+
errors.add(parseError, file.getProgram());
212213

213214
if (this.maxErrorsEnabled()) {
214215
this._errorsFound += 1;

0 commit comments

Comments
 (0)