Skip to content

Conversation

peterdell
Copy link
Contributor

This pull request converts the token kind constants into a TTokenKind enumeration, providing local names and type safety (as opposed to everything being BYTE. For now, TDataType is defined as a synonym for TTokenKind to already improve the readability of the source. Later, TDataType shall only contain the constants that are really data types.

Some additional functions were added to encapsulate access to GetDataSize, GetIdentifierFullName, and GetIdentifierDataSize, and to activate tracing for the computation of data sizes. This was done because the original version relied on the accidental result DataSize[0]=0, which was not guaranteed by the code.

The change is logically simple (prefixing all constants with the correct type prefix, using the proper type for variables/parameters), but it of course affects most of the code. Therefore, I kept it separate for semantic changes. I have retested the results using my tests, and the result is identical.

@tebe6502 tebe6502 merged commit 24ab32c into tebe6502:master Apr 5, 2025
3 checks passed
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.

2 participants