refactor: Tag class support in registerTag()

This commit is contained in:
Jun Yang
2022-11-27 14:04:01 +08:00
parent 1f6ce7c822
commit 92992689cd
145 changed files with 694 additions and 768 deletions
+2 -3
View File
@@ -1,8 +1,7 @@
import { IDENTIFIER, TYPES } from '../util/character'
import { Trie } from '../util/operator-trie'
import { Trie, TrieNode, IDENTIFIER, TYPES } from '../util'
export function matchOperator (str: string, begin: number, trie: Trie, end = str.length) {
let node = trie
let node: TrieNode = trie
let i = begin
let info
while (node[str[i]] && i < end) {