Skip to content

printCst

printCst(node, source): string

Defined in: packages/format-asn1-notation/src/cst-printer.ts:13

Lossless CST printer. Returns the exact source substring covered by the node’s span.

Since every CST node carries span: { start, end } as byte offsets into the original source string, the lossless output is simply source.slice(span.start, span.end). This is byte-for-byte identical to the original input for any unmodified subtree.

CstModuleDefinition

string

string