Skip to content

Commit 2726f64

Browse files
committed
Make formatChevrotainError static.
1 parent 77422cb commit 2726f64

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

grammar/hooks.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ class FormulaParser {
335335
}
336336
if (this.parser.errors.length > 0) {
337337
const error = this.parser.errors[0];
338-
throw this.utils.formatChevrotainError(error, inputText);
338+
throw Utils.formatChevrotainError(error, inputText);
339339
}
340340
return res;
341341
}
@@ -368,7 +368,7 @@ class FormulaParser {
368368
}
369369
if (this.parser.errors.length > 0) {
370370
const error = this.parser.errors[0];
371-
throw this.utils.formatChevrotainError(error, inputText);
371+
throw Utils.formatChevrotainError(error, inputText);
372372
}
373373
return res;
374374
}

grammar/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ class Utils {
386386
return obj instanceof FormulaError;
387387
}
388388

389-
formatChevrotainError(error, inputText) {
389+
static formatChevrotainError(error, inputText) {
390390
let line, column, msg = '';
391391
// e.g. SUM(1))
392392
if (error instanceof NotAllInputParsedException) {

0 commit comments

Comments
 (0)