Module source_header

Module source_header 

Source
Expand description

Read the ISO 10303-21 HEADER section of a source file into the structured form the writer needs to round-trip header fidelity.

Twin of parseSourceHeader in packages/parser/src/source-header.ts; the two are held together by the shared vectors in rust/export/tests/fixtures/step_header_vectors.json (rust/export/tests/step_header_parity.rs and packages/export/src/step-header.parity.test.ts), not by looking alike.

Uses the shared quote-aware header reader rather than the generic STEP value parser: FILE_DESCRIPTION items and FILE_NAME fields routinely carry commas and parentheses inside quoted strings (e.g. 'CoordinateReference [..., ProjectSite: Origin]'), which a splitter blind to quote state mis-splits.

Structs§

SourceHeader
The HEADER records a source file carried, decoded to Unicode.

Functions§

parse_source_header
Parse the HEADER section of content.