How antonbergaker/interpolatedparser works
Key Components to Include:
Compile-Time Components
• A "Parser Call Analyzer" component that collects information about Parse method calls
• "Code Generation" component that produces the runtime parser implementation
Runtime Components
• Custom Interpolated String Handler
• Parser Implementation
• Type Parsing System
Main Sections
Create two main sections separated by a horizontal line:
• Top: Compile Time
• Bottom: Runtime
Compile-Time Flow (Top Section)
• [User Code] -> [Source Generator]
• v
• [Parser Call Analyzer] -> [Code Generation]
• v
• [Generated Parser Implementation]
Runtime Flow (Bottom Section)
• [Input String] -> [Custom String Handler] -> [Parser Implementation]
• v
• [Type Parsing System] <- [Reference Manipulation]
• Use blue for compile-time components
• Use green for runtime components
• Use red for critical security/unsafe operations
• Use yellow for data flow paths
Important Elements to Highlight:
Compile-Time Features
• CallerFilePath and CallerLineNumber attribute usage
• Parse method call analysis
• Generated code placement
Runtime Features
• Custom interpolated string handler implementation
• Unsafe.AsRef operations
• IParseable<T> and ISpanParseable<T> support
Special Notes:
• Unsafe.AsRef operation with a warning symbol
• Line number limitation with an information symbol
• Relationship between generated code and runtime parser
Technical Details to Include:
• How the parser matches compile-time information with runtime calls
• Where type parsing occurs
• Points where reference manipulation happens
Level of Detail:
• Keep the high-level flow clear while showing technical implementation details
• Enough detail to understand the unique approach of using string interpolation in reverse
• Both the compile-time preparation and runtime execution phases
The type system integration
• All symbols used
• Line style meanings
• Warning and information symbols