2020-05-21 11:46:01 +02:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
|
|
class ParsingContext {
|
2020-05-21 14:05:56 +02:00
|
|
|
constructor(params = {}) {
|
|
|
|
|
this.includeNoteContent = !!params.includeNoteContent;
|
|
|
|
|
this.fuzzyAttributeSearch = !!params.fuzzyAttributeSearch;
|
2020-05-21 11:46:01 +02:00
|
|
|
this.highlightedTokens = [];
|
|
|
|
|
this.error = null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
addError(error) {
|
|
|
|
|
// we record only the first error, subsequent ones are usually consequence of the first
|
|
|
|
|
if (!this.error) {
|
|
|
|
|
this.error = error;
|
2020-05-25 00:25:47 +02:00
|
|
|
console.log(this.error);
|
2020-05-21 11:46:01 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
module.exports = ParsingContext;
|