Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AsInt64 ¶ added in v0.8.0
AsInt64 coerces a parsed scalar value (as produced by Parse) to int64. Parse yields integer scalars as int64 and floating scalars as float64; a plain int is accepted defensively. Any other type yields ok=false.
func ScanInlinePPtrs ¶ added in v0.8.0
ScanInlinePPtrs scans raw Unity YAML text for every balanced inline brace group `{...}` that carries a top-level `fileID` key, reporting each fileID and the group's optional guid via onPPtr. It reads the actual braces in the raw bytes, so — unlike a walk of the parsed field tree — it is independent of how the line/value parser happened to structure (or mangle) a PPtr. It is brace-depth aware (a PPtr with a nested sub-mapping, or a PPtr nested inside another flow map, is handled), spans newlines (multiline-flow list items), and unquotes 'single'/"double" keys and values. Block-style PPtrs (no braces) have no brace group and are NOT reported here; recover those from the parsed tree.
It intentionally does NOT track quote state. YAML quoting is positional (a quote opens a scalar only at a value start), but a plain unquoted scalar can contain a literal apostrophe or quote (m_Name: Player's Gun) — tracking quote state on every ' / " byte would flip into a phantom "inside a string" mode and stop matching braces, silently dropping later PPtrs. Pure brace matching can only OVER-detect (a `{fileID: N}` literally inside a quoted string — which Unity never emits), never miss a real PPtr, so it is the safe choice for a scanner whose job is to never silently report "no refs".