mirror of
https://github.com/zadam/trilium.git
synced 2025-11-07 22:05:44 +01:00
19 lines
430 B
JavaScript
19 lines
430 B
JavaScript
|
|
"use strict";
|
||
|
|
|
||
|
|
class ParsingContext {
|
||
|
|
constructor(includeNoteContent) {
|
||
|
|
this.includeNoteContent = includeNoteContent;
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
module.exports = ParsingContext;
|