Skip to content

Latest commit

 

History

History
305 lines (213 loc) · 11.9 KB

File metadata and controls

305 lines (213 loc) · 11.9 KB

Changelog for delphi-forms-parser

Home repo: https://github.com/continuous-delphi/delphi-forms-parser


0.8

0.8.49

  • Add component reference detection and resolution in Delphi.Forms.References. IsComponentReference, ResolveComponentReference, EnumComponentReferences detect fvIdentifier values that match component names within the same form. Dotted cross-form references reported as unresolved. Non-matching identifiers (enum values) excluded. #40

0.8.48

  • Add AST navigation helpers in Delphi.Forms.Navigation: FindObjectByName, FindObjectsByClass, FindProperty, FindPropertyByPath, EnumAllObjects, EnumAllProperties. All case-insensitive, nil-safe. FindPropertyByPath resolves dotted paths through both property names and child object navigation. #48

0.8.47

  • Add path utility functions in Delphi.Forms.Path: GetObjectPath, GetObjectDepth, IsAncestorOf, GetAncestorByClass. All nil-safe, use the Parent back-reference for upward traversal. #47

0.8.46

  • Add visitor pattern for AST tree traversal. Delphi.Forms.Visitor unit with IFormVisitor interface, TFormVisitor base class, WalkForm and WalkObject procedures. Depth-first traversal of objects, properties, values, and collection items. #41

0.8.45

  • Add non-owning Parent: TFormObject back-reference to TFormObject. Set automatically during text and binary parsing. Nil for root and collection items. Enables upward traversal for path utilities and ancestor queries. #46

0.8.44

  • Add form ancestry helpers IsInheritedForm and GetAncestorClassName to the facade. Nil-safe, returns ancestor class name for inherited forms. #39

0.8.43

  • Human-readable token kind names in parser error messages. Add TokenKindToString to Delphi.Forms.Token. Parser errors now say e.g. "Expected ':' but got identifier" instead of "Expected token kind 6 but got 0". #37

0.7

  • All planned features in place. Starting nice-to-haves and cleanup

0.7.41

  • Add form normalization with configurable rules. Delphi.Forms.Normalize unit with NormalizeForm procedure and TFormNormalizeRules set. Removes IDE noise properties (ExplicitBounds, TextHeight, DesignSize) recursively including collection items. TreeDump --normalize flag added. #35

0.7.39

  • Add structured diagnostics for batch processing. Delphi.Forms.Diagnostics unit with TFormDiagnostic, TParseResult, and 8 diagnostic codes (DFM001-DFM008). ParseTextWithDiagnostics, ParseBinaryWithDiagnostics, ParseFileWithDiagnostics, ParseBytesWithDiagnostics on facade. Parser recovers from non-fatal errors and collects multiple diagnostics per parse. Existing exception-based API unchanged. #36

0.6

  • Utilities thinned out to rework to extract logic into class library for reusability

0.6.36

  • Extract statistics computation to Delphi.Forms.Statistics.pas library unit. TFormStatistics record with ComputeStatistics (single + batch overloads) and ToJSON. FormStats CLI migrated to call library. #33

0.6.35

  • Add TFormJsonOptions set to Delphi.Forms.JSON: joIncludeValues, joIncludePositions, joPrettyPrint, joIncludeRawText. Default is [joIncludeValues, joPrettyPrint]. New FormFileToJSONString convenience. TreeDump updated with --compact, --positions, --raw-text CLI flags. #34

0.6.34

  • Extract AST JSON serialization to Delphi.Forms.JSON.pas library unit. FormFileToJSON, FormObjectToJSON, FormPropertyToJSON, FormValuePreview, FormValueKindName, FormObjectKindName. TreeDump migrated to call library. #32

0.5

  • Full third round code review completed

0.5.33

  • 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

0.5.32

  • 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

0.5.31

  • Remove redundant BinaryHex field from TFormValue. RawText already preserves the full {hex} block for text round-trip. #28

0.5.30

  • Fix vaNil binary round-trip. Writer now emits single vaNil byte (1 byte) instead of vaIdent + "nil" (5 bytes) when OriginalValueType = vaNil. #27

0.5.29

  • Fix empty list () and empty collection <> writer output. Previously produced unterminated ( or < with no closing delimiter. #26

0.4

  • Two utilities in place, both with JSON output.

0.4.26

  • 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

0.4.25

  • Add --format:json output to TreeDump utility. Produces structured JSON with formatVersion, inputFile, format, root object tree, and summary stats. Round-trip result included when --round-trip is active. FormatVersion bumped to 1.1.0. #24

0.3

  • Second/alternative code review items completed

0.3.22

  • Fix BinaryWriter WriteShortString silently truncating strings > 255 bytes. Now raises with descriptive message including the string length and preview. #23

0.3.21

  • 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

0.2

  • All code review items completed

0.2.19

  • 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

0.2.17

  • Fix binary writer vaExtended fallback: raise clear exception instead of writing invalid 80-bit layout when ExtendedRawBytes is not set. #19

0.2.16

  • 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

0.2.15

  • 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

0.2.14

  • Fix lexer unknown-character token emitting wrong character. Round-trip now correct for DFM files containing @, !, \, ~, or other unrecognized chars. #16

0.2.13

  • 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

0.2.12

  • 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

0.1 - Unreleased

  • Initial delphi-forms-parser project in place

0.1.10

  • 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

0.1.9

  • 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

0.1.8

  • 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

0.1.7

  • 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

0.1.6

  • 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

0.1.5

  • 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

0.1.4

  • Add recursive-descent text DFM parser; all value types, nested objects, inherited/inline forms, collections, string concatenation. 25 parser tests. #5

0.1.3

  • Add text DFM lexer with 21 token kinds and round-trip fidelity; { hex } tokenized as binary data, not comments. 29 lexer tests. #4

0.1.2

  • Add core AST types: TFormFile, TFormObject, TFormProperty, TFormValue with full ownership semantics and 21 tests (zero memory leaks) #3

0.1.0

  • Initial project scaffolding, modeled after delphi-lexer and delphi-parser projects CI Pipeline: clean > IncVer > build > run > Coverage > CallGraph #1