forked from olcxjas-softworks/LarpixClient
Add capacitorjs runtime
This commit is contained in:
parent
d0ece489ee
commit
f90c0e6c40
8362 changed files with 1502407 additions and 1 deletions
19
node_modules/chevrotain/src/scan/reg_exp_parser.ts
generated
vendored
Normal file
19
node_modules/chevrotain/src/scan/reg_exp_parser.ts
generated
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { RegExpParser, RegExpPattern } from "regexp-to-ast"
|
||||
|
||||
let regExpAstCache = {}
|
||||
const regExpParser = new RegExpParser()
|
||||
|
||||
export function getRegExpAst(regExp: RegExp): RegExpPattern {
|
||||
const regExpStr = regExp.toString()
|
||||
if (regExpAstCache.hasOwnProperty(regExpStr)) {
|
||||
return regExpAstCache[regExpStr]
|
||||
} else {
|
||||
const regExpAst = regExpParser.pattern(regExpStr)
|
||||
regExpAstCache[regExpStr] = regExpAst
|
||||
return regExpAst
|
||||
}
|
||||
}
|
||||
|
||||
export function clearRegExpParserCache() {
|
||||
regExpAstCache = {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue