MCPcopy Create free account
hub / github.com/charto/cxml / constructor

Method constructor

src/parser/Parser.ts:50–61  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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 = [];

Callers

nothing calls this directly

Calls 2

parseCodeBufferMethod · 0.95
setCodeBufferMethod · 0.80

Tested by

no test coverage detected