Call only from ParserConfig.createParser. * @param config Reference to C++ config object. * @param native Reference to C++ parser object.
(private config: ParserConfig, private native: NativeParser)
| 48 | * @param config Reference to C++ config object. |
| 49 | * @param native Reference to C++ parser object. */ |
| 50 | constructor(private config: ParserConfig, private native: NativeParser) { |
| 51 | super({ objectMode: true }); |
| 52 | |
| 53 | this.codeBuffer = new Uint32Array(codeBufferSize); |
| 54 | this.native.setCodeBuffer(this.codeBuffer, () => this.parseCodeBuffer(true)); |
| 55 | |
| 56 | for(let ns of this.config.namespaceList) { |
| 57 | if(ns && (ns.base.isSpecial || ns.base.defaultPrefix == 'xml')) { |
| 58 | this.namespaceList[ns.base.id] = ns.base; |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | public parseSync(data: string | ArrayType) { |
| 64 | const buffer: TokenBuffer = []; |
nothing calls this directly
no test coverage detected