Skip to main content

Crate draxl_patch

Crate draxl_patch 

Source
Expand description

Structured patch operations over the Draxl semantic model.

The patch layer applies semantic edit operators directly to the Draxl AST. It is intentionally slot-aware, identity-aware, and attachment-aware so callers can express concurrent-friendly structural edits instead of rewriting text.

Structs§

PatchError
Error produced while applying a patch operation.
PatchPath
Path address for scalar field or metadata updates.
PatchTextError
Error produced while parsing, resolving, or applying textual patch ops.
RankedDest
Ranked destination for ordered slots.
SlotRef
Public slot reference in the Draxl patch surface.
SurfaceFragment
Fragment source carried verbatim until schema resolution picks a parser.
SurfaceNodeRef
Parsed @id node reference.
SurfacePath
Parsed scalar path before schema resolution.
SurfacePathSegment
Parsed scalar path segment.
SurfaceRankedDest
Parsed ranked destination before schema resolution.
SurfaceSlotRef
Parsed slot reference before schema resolution.
SurfaceValue
Parsed scalar value before type resolution.

Enums§

PatchDest
Destination grammar shared by insert and move.
PatchNode
Replaceable, movable, or insertable semantic fragment.
PatchOp
Structured patch operation over the Draxl semantic model.
PatchValue
Scalar value used by set.
SlotOwner
Slot owner used by slot refs and destinations.
SurfaceDest
Parsed move destination before schema resolution.
SurfacePatchOp
Unresolved textual patch op parsed from the canonical patch surface.
SurfaceSlotOwner
Parsed owner for a slot ref.
SurfaceValueKind
Surface scalar value variants.

Functions§

apply_op
Applies a single patch operation to a file.
apply_op_for_language
Applies a single patch operation to a file using the selected lower language.
apply_ops
Applies a sequence of patch operations in order.
apply_ops_for_language
Applies a sequence of patch operations in order using the selected lower language.
apply_patch_text
Parses, resolves, and applies textual patch ops in order.
apply_patch_text_for_language
Parses, resolves, and applies textual patch ops in order using the selected lower language.
parse_patch_ops
Parses canonical textual patch syntax into unresolved surface ops.
resolve_patch_ops
Resolves textual patch ops against the current file into ordinary PatchOps.
resolve_patch_ops_for_language
Resolves textual patch ops against the current file into ordinary PatchOps using the selected lower language.