pub struct ParserOptions {
pub directives: bool,
pub nondeterministic_hints: bool,
}Expand description
Options for a single parse_with run.
The default reproduces plain SYNX 3.7 behaviour; the non-default settings exist for embedded parses, where the host format owns the directive surface and the SYNX document is untrusted payload.
Fields§
§directives: boolRecognise !-prefixed directive lines (!active, !lock, !tool,
!schema, !llm, !include, !use) and the #!mode: pragma.
SYNXL block delegation sets this to false (SYNXL §9.4): a record that
originates from an untrusted dataset must not be able to turn
!include into a file-read primitive against the consuming process,
nor flip the document into !active mode.
Neutralisation happens inside this parser, after the multiline-block
check, so that | / |+ bodies keep their ! lines verbatim — a
pre-filter over the raw lines would corrupt those bodies.
nondeterministic_hints: boolHonour the random, random:int, random:float and random:bool
type hints.
SYNXL block delegation sets this to false (SYNXL §8.3): a hint
carried by dataset data would make the §12 projection differ between
two reads of the same bytes, which defeats hashing, deduplication and
the byte-identical projection §1.4 is measured on. Disabled, the hints
fall back to automatic casting like any other unrecognised hint.
Trait Implementations§
Source§impl Clone for ParserOptions
impl Clone for ParserOptions
Source§fn clone(&self) -> ParserOptions
fn clone(&self) -> ParserOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more