Std. Regex. Syntax. Emitter
(Cure Standard Library v0.37.2)
View Source
Compile-time emitter for regex syntax trees. It turns parsed patterns into
the matcher representation consumed by Std.Regex.
Examples
use Std.Regex.Syntax.Model
use Std.Regex.Syntax.Emitter
let pattern = LiteralSequence(LiteralExact('a'), LiteralDigit(false))
literal_shape(pattern)
emit_staged_literal_with_options(pattern, literal_default_options())
Summary
Functions
Emits a call expression targeting a constructor or function in Std.Regex.Core.
Emits a lower-bounded repetition ({count,}) in the atomic runtime representation.
Emits a bounded range repetition ({minimum,maximum}) in the atomic runtime representation.
Emits an exact bounded repetition in the atomic runtime representation.
Emits an upper-bounded optional repetition ({0,maximum}) in the atomic runtime representation.
Staged literals publish the constructor-preserving Thompson IR and its result conversion directly. The runtime parser can therefore consume a checked compilation tree instead of rebuilding a Pattern and certifying it at every call site.
Emits an optional atomic runtime pattern, falling back to an empty leaf on None().
Emits a lower-bounded repetition ({count,}) in the ThompsonCompilation representation.
Emits the staged result conversion for a lower-bounded repetition ({count,}).
Emits the conditional-mode result conversion for a lower-bounded repetition ({count,}).
Emits a lower-bounded repetition ({count,}) as PatternConcat followed by PatternRepeatMode.
Emits the compilation shape for a lower-bounded repetition ({count,}).
Emits a bounded range repetition ({minimum,maximum}) in the ThompsonCompilation representation.
Emits the staged result conversion for a bounded range repetition ({minimum,maximum}).
Emits the conditional-mode result conversion for a range repetition ({minimum,maximum}).
Emits a bounded range repetition ({minimum,maximum}) in the core Pattern representation.
Emits the compilation shape for a bounded range repetition ({minimum,maximum}).
Emits an exact bounded repetition in the ThompsonCompilation representation.
Emits the staged result conversion for an exact bounded repetition.
Emits the conditional-mode result conversion for an exact bounded repetition.
Emits an exact bounded repetition as nested PatternConcat nodes.
Emits the nested pair compilation shape for an exact bounded repetition.
Emits an upper-bounded optional repetition ({0,maximum}) in the ThompsonCompilation representation.
Emits the staged result conversion for an upper-bounded optional repetition ({0,maximum}).
Emits the conditional-mode result conversion for an upper-bounded repetition ({0,maximum}).
Emits an upper-bounded optional repetition ({0,maximum}) in the core Pattern representation.
Emits the compilation shape for an upper-bounded optional repetition ({0,maximum}).
Emits a runtime CaptureLayout describing all capture slots in a pattern.
Emits an optional capture group name as Std.Option.None or Std.Option.Some.
Emits a list of runtime CaptureSlot entries.
Emits a syntax list of character literals.
Emits a runtime ClassKinds struct encoding shorthand character-class memberships.
Emits the raw Std.Regex.Core compilation shape code for pattern before conversion.
Emits the compilation shape of an optional pattern, defaulting to UnitC on None().
Emits the ThompsonCompilation tree for a \R line-break sequence under options.
Emits a ThompsonPredicate matching one character of a CRLF line-break pair under options.
Emits a PatternPredicate matching one character of a CRLF line-break pair under options.
Emits the core Pattern for a \R line-break sequence under options.
Emits a ThompsonPredicate matching a single scalar line-break character under options.
Emits a PatternPredicate matching a single scalar line-break character under options.
Emits the ThompsonCompilation alternation over scalar line-break characters under options.
Emits the core Pattern matching any single scalar line-break character allowed by options.
Emits surface Std.Regex.Runtime combinator syntax for pattern with default options.
Emits a surface runtime regex for an optional pattern, defaulting to empty().
Emits surface Std.Regex.Runtime combinator syntax for pattern honoring options.
Emits an option-configured surface runtime regex for an optional pattern, defaulting to empty().
Emits a left-biased LookaroundAlternate node between left and right.
Emits a lower-bounded repetition ({count,}) in the lookaround compilation tree.
Emits a bounded range repetition ({minimum,maximum}) in the lookaround compilation tree.
Emits an exact bounded repetition in the lookaround compilation tree.
Emits an upper-bounded optional repetition ({0,maximum}) in the lookaround compilation tree.
Emits a single-character LookaroundPredicate node.
Emits a LookaroundConcat node joining left and right.
Emits a conditional branch in the lookaround compilation tree, guarded by capture slot when indexed.
Emits the lookaround compilation tree for \R according to the active newline policy.
Emits a boolean literal for positive (true) or negative (false) lookaround polarity.
Emits the lookaround-capable staged compilation tree for pattern under options.
Emits an optional lookaround compilation tree, falling back to LookaroundEmpty on None().
Emits a left-biased NamedThompsonAlternate node between left and right.
Emits a lower-bounded repetition ({count,}) in the named-capture Thompson representation.
Emits a bounded range repetition ({minimum,maximum}) in the named-capture Thompson representation.
Emits an exact bounded repetition in the named-capture Thompson representation.
Emits an upper-bounded optional repetition ({0,maximum}) in the named-capture Thompson representation.
Emits a single-character NamedThompsonPredicate node.
Emits a NamedThompsonConcat node joining left and right.
Emits a conditional branch in the named-capture Thompson tree, guarded by slot when indexed.
Emits the named-capture Thompson tree for \R according to the active newline policy.
Named literals publish a parallel Thompson tree. Its ordinary branches are identical to the staged tree above; only indexed capture groups carry a slot-bearing group constructor.
Emits the named Thompson compilation of an optional pattern, defaulting to NamedThompsonEmpty.
Emits Peano natural number syntax (Std.Nat.Z / Std.Nat.S) for value.
Emits the core NewlinePolicy constructor selected by options.
Emits a runtime RegexOptions struct from compile-time LiteralRegexOptions.
Emits the runtime POSIX character-class constructor for posix_class.
Emits a syntax list of runtime PosixClassMatch entries.
Emits a syntax list of runtime CharacterRange values.
Emits the Std.Regex.Core shape-code syntax for a LiteralShapeCode.
Emits the constructor-preserving ThompsonCompilation tree for pattern under options.
Emits the staged Thompson compilation of an optional pattern, defaulting to ThompsonEmpty.
Emits the runtime conversion mapping raw match evidence to the pattern's surface result type.
Emits the staged result conversion for a pattern, using unit identity for omitted conditional branches.
Emits an optional conditional staged conversion, defaulting to unit_identity_conversion.
Emits the staged conversion of an optional pattern, defaulting to unit_identity_conversion.
Emits the end-anchor boundary constraint for the active multiline and newline options.
Emits the staged execution hint selecting lookaround, atomic, or Thompson machine evaluation.
Emits a complete StagedRegex value for pattern under options.
Emits a StagedRegex value using conditional-aware result conversion.
Emits the core Std.Regex.Core.Pattern AST for pattern under options.
Emits the staged core pattern of an optional pattern, defaulting to PatternEmpty.
The staged parser consumes a row-backed machine reconstructed from the checked Thompson tree. No closure-machine constructor is emitted into the literal expansion.
Emits the start-anchor boundary constraint for the active multiline and newline options.
Emits a word-boundary constraint respecting negation and Unicode mode.
Emits the runtime Unicode General Category constructor for property.
Emits a syntax list of runtime UnicodePropertyMatch entries.
Computes the compile-time result shape code for a parsed literal pattern.
Computes the literal shape of an optional pattern, defaulting to UnitC on None().
Prepends head to a :list syntax node, or wraps head in a singleton list if tail is not a list node.
Emits a call expression targeting a function in Std.Regex.Runtime.
Functions
fn core_call(name: String, args: List(Syntax)) -> Syntax
Emits a call expression targeting a constructor or function in Std.Regex.Core.
fn emit_atomic_bounded_at_least(inner: LiteralPattern, count: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a lower-bounded repetition ({count,}) in the atomic runtime representation.
fn emit_atomic_bounded_between(inner: LiteralPattern, minimum: Nat, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a bounded range repetition ({minimum,maximum}) in the atomic runtime representation.
fn emit_atomic_bounded_exact(inner: LiteralPattern, count: Nat, options: LiteralRegexOptions) -> Syntax
Emits an exact bounded repetition in the atomic runtime representation.
fn emit_atomic_bounded_up_to(inner: LiteralPattern, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits an upper-bounded optional repetition ({0,maximum}) in the atomic runtime representation.
fn emit_atomic_runtime_pattern(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Staged literals publish the constructor-preserving Thompson IR and its result conversion directly. The runtime parser can therefore consume a checked compilation tree instead of rebuilding a Pattern and certifying it at every call site.
fn emit_atomic_runtime_pattern_or_empty(pattern: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits an optional atomic runtime pattern, falling back to an empty leaf on None().
fn emit_bounded_at_least_compilation(inner: LiteralPattern, count: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a lower-bounded repetition ({count,}) in the ThompsonCompilation representation.
fn emit_bounded_at_least_conversion(inner: LiteralPattern, count: Nat) -> Syntax
Emits the staged result conversion for a lower-bounded repetition ({count,}).
fn emit_bounded_at_least_conversion_conditional(inner: LiteralPattern, count: Nat) -> Syntax
Emits the conditional-mode result conversion for a lower-bounded repetition ({count,}).
fn emit_bounded_at_least_pattern(inner: LiteralPattern, count: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a lower-bounded repetition ({count,}) as PatternConcat followed by PatternRepeatMode.
fn emit_bounded_at_least_shape(inner: LiteralPattern, count: Nat) -> Syntax
Emits the compilation shape for a lower-bounded repetition ({count,}).
fn emit_bounded_between_compilation(inner: LiteralPattern, minimum: Nat, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a bounded range repetition ({minimum,maximum}) in the ThompsonCompilation representation.
fn emit_bounded_between_conversion(inner: LiteralPattern, minimum: Nat, maximum: Nat) -> Syntax
Emits the staged result conversion for a bounded range repetition ({minimum,maximum}).
fn emit_bounded_between_conversion_conditional(inner: LiteralPattern, minimum: Nat, maximum: Nat) -> Syntax
Emits the conditional-mode result conversion for a range repetition ({minimum,maximum}).
fn emit_bounded_between_pattern(inner: LiteralPattern, minimum: Nat, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a bounded range repetition ({minimum,maximum}) in the core Pattern representation.
fn emit_bounded_between_shape(inner: LiteralPattern, minimum: Nat, maximum: Nat) -> Syntax
Emits the compilation shape for a bounded range repetition ({minimum,maximum}).
fn emit_bounded_exact_compilation(inner: LiteralPattern, count: Nat, options: LiteralRegexOptions) -> Syntax
Emits an exact bounded repetition in the ThompsonCompilation representation.
fn emit_bounded_exact_conversion(inner: LiteralPattern, count: Nat) -> Syntax
Emits the staged result conversion for an exact bounded repetition.
fn emit_bounded_exact_conversion_conditional(inner: LiteralPattern, count: Nat) -> Syntax
Emits the conditional-mode result conversion for an exact bounded repetition.
fn emit_bounded_exact_pattern(inner: LiteralPattern, count: Nat, options: LiteralRegexOptions) -> Syntax
Emits an exact bounded repetition as nested PatternConcat nodes.
fn emit_bounded_exact_shape(inner: LiteralPattern, count: Nat) -> Syntax
Emits the nested pair compilation shape for an exact bounded repetition.
fn emit_bounded_up_to_compilation(inner: LiteralPattern, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits an upper-bounded optional repetition ({0,maximum}) in the ThompsonCompilation representation.
fn emit_bounded_up_to_conversion(inner: LiteralPattern, maximum: Nat) -> Syntax
Emits the staged result conversion for an upper-bounded optional repetition ({0,maximum}).
fn emit_bounded_up_to_conversion_conditional(inner: LiteralPattern, maximum: Nat) -> Syntax
Emits the conditional-mode result conversion for an upper-bounded repetition ({0,maximum}).
fn emit_bounded_up_to_pattern(inner: LiteralPattern, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits an upper-bounded optional repetition ({0,maximum}) in the core Pattern representation.
fn emit_bounded_up_to_shape(inner: LiteralPattern, maximum: Nat) -> Syntax
Emits the compilation shape for an upper-bounded optional repetition ({0,maximum}).
fn emit_capture_layout(layout: LiteralCaptureLayout) -> Syntax
Emits a runtime CaptureLayout describing all capture slots in a pattern.
fn emit_capture_name(name: Option(String)) -> Syntax
Emits an optional capture group name as Std.Option.None or Std.Option.Some.
fn emit_capture_slots(slots: List(LiteralCaptureSlotInfo)) -> Syntax
Emits a list of runtime CaptureSlot entries.
fn emit_chars(chars: List(Char)) -> Syntax
Emits a syntax list of character literals.
fn emit_class_kinds(kinds: LiteralClassKinds) -> Syntax
Emits a runtime ClassKinds struct encoding shorthand character-class memberships.
fn emit_compilation_shape(pattern: LiteralPattern) -> Syntax
Emits the raw Std.Regex.Core compilation shape code for pattern before conversion.
fn emit_compilation_shape_or_unit(pattern: Option(LiteralPattern)) -> Syntax
Emits the compilation shape of an optional pattern, defaulting to UnitC on None().
fn emit_line_break_compilation(options: LiteralRegexOptions) -> Syntax
Emits the ThompsonCompilation tree for a \R line-break sequence under options.
fn emit_line_break_pair_char_compilation(_char: Char, options: LiteralRegexOptions) -> Syntax
Emits a ThompsonPredicate matching one character of a CRLF line-break pair under options.
fn emit_line_break_pair_char_pattern(_char: Char, options: LiteralRegexOptions) -> Syntax
Emits a PatternPredicate matching one character of a CRLF line-break pair under options.
fn emit_line_break_pattern(options: LiteralRegexOptions) -> Syntax
Emits the core Pattern for a \R line-break sequence under options.
fn emit_line_break_scalar_char_compilation(_char: Char, options: LiteralRegexOptions) -> Syntax
Emits a ThompsonPredicate matching a single scalar line-break character under options.
fn emit_line_break_scalar_char_pattern(_char: Char, options: LiteralRegexOptions) -> Syntax
Emits a PatternPredicate matching a single scalar line-break character under options.
fn emit_line_break_scalar_compilation(options: LiteralRegexOptions) -> Syntax
Emits the ThompsonCompilation alternation over scalar line-break characters under options.
fn emit_line_break_scalar_pattern(options: LiteralRegexOptions) -> Syntax
Emits the core Pattern matching any single scalar line-break character allowed by options.
fn emit_literal(pattern: LiteralPattern) -> Syntax
Emits surface Std.Regex.Runtime combinator syntax for pattern with default options.
fn emit_literal_or_empty(pattern: Option(LiteralPattern)) -> Syntax
Emits a surface runtime regex for an optional pattern, defaulting to empty().
fn emit_literal_with_options(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits surface Std.Regex.Runtime combinator syntax for pattern honoring options.
fn emit_literal_with_options_or_empty(pattern: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits an option-configured surface runtime regex for an optional pattern, defaulting to empty().
fn emit_lookaround_alt_compilation(left: Syntax, right: Syntax) -> Syntax
Emits a left-biased LookaroundAlternate node between left and right.
fn emit_lookaround_bounded_at_least(inner: LiteralPattern, count: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a lower-bounded repetition ({count,}) in the lookaround compilation tree.
fn emit_lookaround_bounded_between(inner: LiteralPattern, minimum: Nat, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a bounded range repetition ({minimum,maximum}) in the lookaround compilation tree.
fn emit_lookaround_bounded_exact(inner: LiteralPattern, count: Nat, options: LiteralRegexOptions) -> Syntax
Emits an exact bounded repetition in the lookaround compilation tree.
fn emit_lookaround_bounded_up_to(inner: LiteralPattern, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits an upper-bounded optional repetition ({0,maximum}) in the lookaround compilation tree.
fn emit_lookaround_char_compilation(char: Char) -> Syntax
Emits a single-character LookaroundPredicate node.
fn emit_lookaround_concat_compilation(left: Syntax, right: Syntax) -> Syntax
Emits a LookaroundConcat node joining left and right.
fn emit_lookaround_conditional(reference: LiteralCaptureReference, yes: LiteralPattern, no: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits a conditional branch in the lookaround compilation tree, guarded by capture slot when indexed.
fn emit_lookaround_line_break_compilation(options: LiteralRegexOptions) -> Syntax
Emits the lookaround compilation tree for \R according to the active newline policy.
fn emit_lookaround_polarity(polarity: LiteralAssertionPolarity) -> Syntax
Emits a boolean literal for positive (true) or negative (false) lookaround polarity.
fn emit_lookaround_staged_compilation(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits the lookaround-capable staged compilation tree for pattern under options.
fn emit_lookaround_staged_compilation_or_empty(pattern: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits an optional lookaround compilation tree, falling back to LookaroundEmpty on None().
fn emit_named_alt_compilation(left: Syntax, right: Syntax) -> Syntax
Emits a left-biased NamedThompsonAlternate node between left and right.
fn emit_named_bounded_at_least_compilation(inner: LiteralPattern, count: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a lower-bounded repetition ({count,}) in the named-capture Thompson representation.
fn emit_named_bounded_between_compilation(inner: LiteralPattern, minimum: Nat, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits a bounded range repetition ({minimum,maximum}) in the named-capture Thompson representation.
fn emit_named_bounded_exact_compilation(inner: LiteralPattern, count: Nat, options: LiteralRegexOptions) -> Syntax
Emits an exact bounded repetition in the named-capture Thompson representation.
fn emit_named_bounded_up_to_compilation(inner: LiteralPattern, maximum: Nat, lazy: Bool, options: LiteralRegexOptions) -> Syntax
Emits an upper-bounded optional repetition ({0,maximum}) in the named-capture Thompson representation.
fn emit_named_char_compilation(char: Char) -> Syntax
Emits a single-character NamedThompsonPredicate node.
fn emit_named_concat_compilation(left: Syntax, right: Syntax) -> Syntax
Emits a NamedThompsonConcat node joining left and right.
fn emit_named_conditional(reference: LiteralCaptureReference, yes: LiteralPattern, no: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits a conditional branch in the named-capture Thompson tree, guarded by slot when indexed.
fn emit_named_line_break_compilation(options: LiteralRegexOptions) -> Syntax
Emits the named-capture Thompson tree for \R according to the active newline policy.
fn emit_named_staged_compilation(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Named literals publish a parallel Thompson tree. Its ordinary branches are identical to the staged tree above; only indexed capture groups carry a slot-bearing group constructor.
fn emit_named_staged_compilation_or_empty(pattern: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits the named Thompson compilation of an optional pattern, defaulting to NamedThompsonEmpty.
fn emit_nat(value: Nat) -> Syntax
Emits Peano natural number syntax (Std.Nat.Z / Std.Nat.S) for value.
fn emit_newline_policy(options: LiteralRegexOptions) -> Syntax
Emits the core NewlinePolicy constructor selected by options.
fn emit_options(options: LiteralRegexOptions) -> Syntax
Emits a runtime RegexOptions struct from compile-time LiteralRegexOptions.
fn emit_posix_class(posix_class: LiteralPosixClass) -> Syntax
Emits the runtime POSIX character-class constructor for posix_class.
fn emit_posix_class_matches(values: List(LiteralPosixClassMatch)) -> Syntax
Emits a syntax list of runtime PosixClassMatch entries.
fn emit_ranges(ranges: List(LiteralCharacterRange)) -> Syntax
Emits a syntax list of runtime CharacterRange values.
fn emit_shape(shape: LiteralShapeCode) -> Syntax
Emits the Std.Regex.Core shape-code syntax for a LiteralShapeCode.
fn emit_staged_compilation(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits the constructor-preserving ThompsonCompilation tree for pattern under options.
fn emit_staged_compilation_or_empty(pattern: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits the staged Thompson compilation of an optional pattern, defaulting to ThompsonEmpty.
fn emit_staged_conversion(pattern: LiteralPattern) -> Syntax
Emits the runtime conversion mapping raw match evidence to the pattern's surface result type.
fn emit_staged_conversion_conditional(pattern: LiteralPattern) -> Syntax
Emits the staged result conversion for a pattern, using unit identity for omitted conditional branches.
fn emit_staged_conversion_conditional_or_unit(pattern: Option(LiteralPattern)) -> Syntax
Emits an optional conditional staged conversion, defaulting to unit_identity_conversion.
fn emit_staged_conversion_or_unit(pattern: Option(LiteralPattern)) -> Syntax
Emits the staged conversion of an optional pattern, defaulting to unit_identity_conversion.
fn emit_staged_end_constraint(options: LiteralRegexOptions) -> Syntax
Emits the end-anchor boundary constraint for the active multiline and newline options.
fn emit_staged_hint(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits the staged execution hint selecting lookaround, atomic, or Thompson machine evaluation.
fn emit_staged_literal_with_options(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits a complete StagedRegex value for pattern under options.
fn emit_staged_literal_with_options_conditional(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits a StagedRegex value using conditional-aware result conversion.
fn emit_staged_pattern(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
Emits the core Std.Regex.Core.Pattern AST for pattern under options.
fn emit_staged_pattern_or_empty(pattern: Option(LiteralPattern), options: LiteralRegexOptions) -> Syntax
Emits the staged core pattern of an optional pattern, defaulting to PatternEmpty.
fn emit_staged_rows(pattern: LiteralPattern, options: LiteralRegexOptions) -> Syntax
The staged parser consumes a row-backed machine reconstructed from the checked Thompson tree. No closure-machine constructor is emitted into the literal expansion.
fn emit_staged_start_constraint(options: LiteralRegexOptions) -> Syntax
Emits the start-anchor boundary constraint for the active multiline and newline options.
fn emit_staged_word_constraint(negated: Bool, options: LiteralRegexOptions) -> Syntax
Emits a word-boundary constraint respecting negation and Unicode mode.
fn emit_unicode_property(property: LiteralUnicodeProperty) -> Syntax
Emits the runtime Unicode General Category constructor for property.
fn emit_unicode_property_matches(values: List(LiteralUnicodePropertyMatch)) -> Syntax
Emits a syntax list of runtime UnicodePropertyMatch entries.
fn literal_shape(pattern: LiteralPattern) -> LiteralShapeCode
Computes the compile-time result shape code for a parsed literal pattern.
fn literal_shape_or_unit(pattern: Option(LiteralPattern)) -> LiteralShapeCode
Computes the literal shape of an optional pattern, defaulting to UnitC on None().
fn prepend_syntax(head: Syntax, tail: Syntax) -> Syntax
Prepends head to a :list syntax node, or wraps head in a singleton list if tail is not a list node.
fn runtime_call(name: String, args: List(Syntax)) -> Syntax
Emits a call expression targeting a function in Std.Regex.Runtime.