Skip to content

Conversation

VolodymyrBg
Copy link

This commit fixes a potential panic in the AST parsing logic when processing pragma directives. Instead of directly accessing the start and end fields of the Meta struct, which could potentially be uninitialized, the code now safely uses the location field through cloning. This change ensures more robust error handling when processing malformed pragma directives in the source code.

This commit fixes a potential panic in the AST parsing logic when processing
pragma directives. Instead of directly accessing the `start` and `end` fields 
of the Meta struct, which could potentially be uninitialized, the code now
safely uses the `location` field through cloning. This change ensures more
robust error handling when processing malformed pragma directives in the source
code.
@OBrezhniev OBrezhniev requested review from clararod9 and alrubio August 3, 2025 12:06
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.

1 participant