2
0
mirror of https://github.com/tenrok/BBob.git synced 2026-06-14 18:42:24 +03:00

feat(parser): custom open and close tags support, html tags tests (#3)

This commit is contained in:
Nikolay Kostyurin
2018-09-18 23:41:52 +02:00
committed by GitHub
parent f5fd078eca
commit 790825af30
9 changed files with 268 additions and 100 deletions
+5 -5
View File
@@ -53,14 +53,14 @@ const convertTagToText = (token) => {
class Token {
constructor(type, value, line, row) {
this.type = String(type);
this.value = String(value);
this.line = Number(line);
this.row = Number(row);
this[TOKEN_TYPE_ID] = String(type);
this[TOKEN_VALUE_ID] = String(value);
this[TOKEN_LINE_ID] = Number(line);
this[TOKEN_COLUMN_ID] = Number(row);
}
isEmpty() {
return !!this.type;
return !!this[TOKEN_TYPE_ID];
}
isText() {