FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Accept Delphi's 'packed' keyword in type declarations (fixes #246) by TetzkatLipHoka · Pull Request #314 · remobjects/pascalscript · GitHub

Accept Delphi's 'packed' keyword in type declarations (fixes #246) - #314

Open
TetzkatLipHoka wants to merge 1 commit into
remobjects:masterfrom
TetzkatLipHoka:fix/packed-records
Open

TetzkatLipHoka wants to merge 1 commit into
remobjects:masterfrom
TetzkatLipHoka:fix/packed-records

Conversation

Copy link
Copy Markdown

The parser rejected 'packed record', 'packed array' and 'packed set' in
script type sections and AddTypeS declarations, although PascalScript
records and arrays are always packed anyway - Delphi type declarations
could not be pasted into scripts unchanged.

ReadType now skips a leading 'packed' when a structured type
(record/array/set) follows; anything else after 'packed' is still an
error, and the memory layout is unaffected.

Repro (fails on master, passes with this change, DCC32+DCC64):
type TP = packed record x, y: Integer; end; // script type section
Sender.AddTypeS('THostPacked', 'packed record a: Byte; b: Integer; end');

Fixes #246.

🤖 Generated with Claude Code

…ts#246)

The parser rejected 'packed record', 'packed array' and 'packed set' in
script type sections and AddTypeS declarations, although PascalScript
records and arrays are always packed anyway - Delphi type declarations
could not be pasted into scripts unchanged.

ReadType now skips a leading 'packed' when a structured type
(record/array/set) follows; anything else after 'packed' is still an
error, and the memory layout is unaffected.

Repro (fails on master, passes with this change, DCC32+DCC64):
  type TP = packed record x, y: Integer; end;   // script type section
  Sender.AddTypeS('THostPacked', 'packed record a: Byte; b: Integer; end');

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

packed and bitpacked records

1 participant


Back | FazBrowse Home | New Git URL