Fixes and improvements #23
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes several changes to improve identifier management and error handling in the codebase, as well as updates to documentation and test files. The most important changes include modifying how identifiers are registered and checked, updating the documentation to reflect these changes, and adding new test cases to ensure the correctness of the implementation.
Identifier Management and Error Handling:
src/lang.c: Replacedcheck_identifier_*functions withregister_identifier_*functions to ensure identifiers are registered correctly when defining structs, unions, and enums. [1] [2] [3]src/lib.c: Updatedconflict_identifier_register_lutto reflect the correct conflict rules between struct, union, and enum names. Added suggestions incheck_identifier_in_tablefunction to guide users on correct identifier usage. [1] [2]Documentation Updates:
doc/parser.md: Added a new section on unresolved issues related to identifier management and updated the description of how struct/union/enum identifiers are handled. [1] [2]Test File Updates:
resource/test/test-identifier-predeclared/testcase1.jtl.h: Added a warning comment for typedef usage to reflect the new identifier management rules.resource/test/test-identifier-predeclared/testcase2.jtl.h: Added new test cases to check the correct handling of struct and enum identifiers.Script Updates:
batchtest.sh: Modified the script to run tests only on files with the.jtl.hextension by introducing a newinputextvariable. [1] [2]