Home repo: https://github.com/continuous-delphi/delphi-forms-parser
- Add component reference detection and resolution in
Delphi.Forms.References.IsComponentReference,ResolveComponentReference,EnumComponentReferencesdetectfvIdentifiervalues that match component names within the same form. Dotted cross-form references reported as unresolved. Non-matching identifiers (enum values) excluded. #40
- Add AST navigation helpers in
Delphi.Forms.Navigation:FindObjectByName,FindObjectsByClass,FindProperty,FindPropertyByPath,EnumAllObjects,EnumAllProperties. All case-insensitive, nil-safe.FindPropertyByPathresolves dotted paths through both property names and child object navigation. #48
- Add path utility functions in
Delphi.Forms.Path:GetObjectPath,GetObjectDepth,IsAncestorOf,GetAncestorByClass. All nil-safe, use theParentback-reference for upward traversal. #47
- Add visitor pattern for AST tree traversal.
Delphi.Forms.Visitorunit withIFormVisitorinterface,TFormVisitorbase class,WalkFormandWalkObjectprocedures. Depth-first traversal of objects, properties, values, and collection items. #41
- Add non-owning
Parent: TFormObjectback-reference toTFormObject. Set automatically during text and binary parsing. Nil for root and collection items. Enables upward traversal for path utilities and ancestor queries. #46
- Add form ancestry helpers
IsInheritedFormandGetAncestorClassNameto the facade. Nil-safe, returns ancestor class name for inherited forms. #39
- Human-readable token kind names in parser error messages. Add
TokenKindToStringtoDelphi.Forms.Token. Parser errors now say e.g. "Expected ':' but got identifier" instead of "Expected token kind 6 but got 0". #37
- All planned features in place. Starting nice-to-haves and cleanup
- Add form normalization with configurable rules.
Delphi.Forms.Normalizeunit withNormalizeFormprocedure andTFormNormalizeRulesset. Removes IDE noise properties (ExplicitBounds, TextHeight, DesignSize) recursively including collection items. TreeDump--normalizeflag added. #35
- Add structured diagnostics for batch processing.
Delphi.Forms.Diagnosticsunit withTFormDiagnostic,TParseResult, and 8 diagnostic codes (DFM001-DFM008).ParseTextWithDiagnostics,ParseBinaryWithDiagnostics,ParseFileWithDiagnostics,ParseBytesWithDiagnosticson facade. Parser recovers from non-fatal errors and collects multiple diagnostics per parse. Existing exception-based API unchanged. #36
- Utilities thinned out to rework to extract logic into class library for reusability
- Extract statistics computation to
Delphi.Forms.Statistics.paslibrary unit.TFormStatisticsrecord withComputeStatistics(single + batch overloads) andToJSON. FormStats CLI migrated to call library. #33
- Add
TFormJsonOptionsset toDelphi.Forms.JSON:joIncludeValues,joIncludePositions,joPrettyPrint,joIncludeRawText. Default is[joIncludeValues, joPrettyPrint]. NewFormFileToJSONStringconvenience. TreeDump updated with--compact,--positions,--raw-textCLI flags. #34
- Extract AST JSON serialization to
Delphi.Forms.JSON.paslibrary unit.FormFileToJSON,FormObjectToJSON,FormPropertyToJSON,FormValuePreview,FormValueKindName,FormObjectKindName. TreeDump migrated to call library. #32
- Full third round code review completed
- Add Win1252 ANSI fallback for text DFM reading. ParseBytes auto-detects UTF-8, catches EEncodingError on invalid byte sequences, and retries with Windows-1252 (codepage 1252). Explicit encoding overloads do not fall back. #31
- Add source position tracking (SourceStart/SourceEnd) to TFormObject, TFormProperty, and TFormValue. Parser populates 0-based offsets from tokens. Defaults to -1 for binary-parsed and programmatically constructed ASTs. #29
- Remove redundant
BinaryHexfield fromTFormValue.RawTextalready preserves the full{hex}block for text round-trip. #28
- Fix vaNil binary round-trip. Writer now emits single
vaNilbyte (1 byte) instead ofvaIdent+ "nil" (5 bytes) whenOriginalValueType = vaNil. #27
- Fix empty list
()and empty collection<>writer output. Previously produced unterminated(or<with no closing delimiter. #26
- Two utilities in place, both with JSON output.
- Add FormStats utility for component and property statistics across a codebase. Single file, directory, and --recursive scanning. Text and JSON output. Reports components, classes, properties, nesting depth, value type distribution, object kinds, top-N classes/properties, parse failures. #25
- Add
--format:jsonoutput to TreeDump utility. Produces structured JSON with formatVersion, inputFile, format, root object tree, and summary stats. Round-trip result included when--round-tripis active. FormatVersion bumped to 1.1.0. #24
- Second/alternative code review items completed
- Fix BinaryWriter WriteShortString silently truncating strings > 255 bytes. Now raises with descriptive message including the string length and preview. #23
- Add encoding detection for text DFM files. ParseBytes auto-detects UTF-8 BOM; defaults to UTF-8 for no-BOM files. New ParseFile/ParseBytes overloads accept explicit TEncoding for legacy ANSI-encoded projects. #21
- All code review items completed
- Add malformed/edge-case input tests: binary reader (invalid signature, truncated stream, unknown value type tag), parser (incomplete hex data, char literal). Combined with tests from #16 and #17, all 8 identified test gaps are now covered. #20
- Fix binary writer vaExtended fallback: raise clear exception instead of writing invalid 80-bit layout when ExtendedRawBytes is not set. #19
- Preserve binary collection item indices for round-trip. Reader stores index in TFormObject.ItemIndex; writer uses preserved value when set, falls back to sequential (0,1,2...) for programmatically constructed ASTs. #18
- Add bounds guards to parser accessors (Current, CurrentKind, CurrentText, Expect) -- raises descriptive "Unexpected end of DFM input" instead of access violation on truncated input. 4 new truncated-input tests. #17
- Fix lexer unknown-character token emitting wrong character. Round-trip now
correct for DFM files containing
@,!,\,~, or other unrecognized chars. #16
- Support typed collection items (
item ClassName ... end). Parser detects optional class name via lookahead, writer emits it when present. Golden file and round-trip tests for typed collections. #11
- Preserve original binary value type tags for true binary round-trip. Reader stores OriginalValueType and ExtendedRawBytes on TFormValue; writer uses them to reproduce byte-identical output for vaSingle, vaExtended, vaCurrency, vaDate, vaString, vaLString, vaWString, vaUString, and vaInt32. 9 new round-trip tests. #12
- Initial delphi-forms-parser project in place
- Add edge-case golden files: empty form (0 properties, 0 children), deep nesting (12 levels), and large binary data (1024 bytes / 32 hex lines). 6 new tests. #13
- Add FMX golden test file (fmx_form.fmx) with FMX-specific float coordinates, nested layouts, and opacity. Round-trip and structural tests verify .fmx support. #14
- Add TDelphiFormsParser facade with ParseFile/ParseText/ParseBinary/WriteText/ WriteBinary/BinaryToText/TextToBinary/DetectFormat. Golden test suite with 6 .dfm files and 9 golden tests. Cross-format round-trip tests (11 tests). Total: 151 tests, 0 leaks. #9
- Add binary DFM writer (TPF0 format); chooses smallest integer type tag, writes strings as vaUTF8String, encodes object kind flags in class name byte. Binary round-trip verified. 16 binary writer tests. #8
- Add binary DFM reader (TPF0 format); handles all value type tags including vaInt8-vaInt64, vaExtended (80-bit), vaString/vaLString/vaWString/vaUTF8String/ vaUString, vaIdent, vaTrue/vaFalse, vaSet, vaBinary, vaList, vaCollection. 16 binary reader tests. #7
- Add text DFM writer with round-trip fidelity; preserves RawText for parsed values, produces canonical 2-space-indent output for constructed ASTs. 23 writer tests including 8 round-trip verifications. #6
- Add recursive-descent text DFM parser; all value types, nested objects, inherited/inline forms, collections, string concatenation. 25 parser tests. #5
- Add text DFM lexer with 21 token kinds and round-trip fidelity;
{ hex }tokenized as binary data, not comments. 29 lexer tests. #4
- Add core AST types: TFormFile, TFormObject, TFormProperty, TFormValue with full ownership semantics and 21 tests (zero memory leaks) #3
- Initial project scaffolding, modeled after delphi-lexer and delphi-parser projects CI Pipeline: clean > IncVer > build > run > Coverage > CallGraph #1