v0.1
TinyAst.Preprocessor v0.1.0 — Release Notes (First Release)
Highlights
- AST-native preprocessing on schema-bound
SyntaxTree(no text re-parsing). - Import discovery via TinyAst Query (
Query.Syntax<TImportNode>()) with locations anchored to node start (Position..Position). - Merge implemented via TinyAst
SyntaxEditor(no green-node manipulation). - Full TinyPreprocessor 0.3.0+ pipeline support: dependency resolution, diagnostics, and source mapping.
New APIs
ImportDirective+ImportDirectiveModelfor directive semantics and location modeling.ImportDirectiveParser<TImportNode>(delegate-based): configure withFunc<TImportNode, string?> getReference.SyntaxTreeMergeStrategy<TImportNode, TContext>(delegate-based): same reference extractor used during merge.SyntaxTreeContentModelimplementingIContentModel<SyntaxTree>.- Test helpers:
InMemorySyntaxTreeResourceStore,InMemorySyntaxTreeResourceResolver,ImportDirectiveLocationIndex. - Convenience wiring:
SyntaxTreePreprocessor<TImportNode, TContext>(one-stop preprocessor setup)SyntaxTreePreprocessor<TImportNode>(context defaults toobject)SyntaxTreeBridge<TImportNode, TContext>(parser + merge strategy bundle)
Behavior / Design Notes
- Schema binding is required (
SyntaxTree.HasSchema == true) for directive discovery. - Reference extraction is non-invasive: downstream AST nodes do not need to implement any bridge interface.
- Resolution failures can be pinned back to import locations via
ImportDirectiveLocationIndex.
Diagnostics & Limits
- Cycle detection (
CircularDependencyDiagnostic) and max include depth enforcement (MaxDepthExceededDiagnostic) are covered by end-to-end tests. - Resolution failures produce
ResolutionFailedDiagnosticand can carry location/resource context.
Packaging
- NuGet packaging is configured and
dotnet packproducesTinyAst.Preprocessor.0.1.0.nupkg. - Includes symbols (
.snupkg) and generated XML documentation output (currently with CS1591 warnings for missing docs).
Compatibility
- Target framework: .NET 8 (
net8.0) - Depends on: TinyAst 0.11.0, TinyPreprocessor 0.3.0
Quality
- Test suite: 76 tests passing (
dotnet testgreen), including integration coverage of the full preprocessing pipeline.