Skip to content

Java: fix ComposVisitor dropping position info with -l#569

Open
zafer-esen wants to merge 1 commit into
BNFC:masterfrom
zafer-esen:master
Open

Java: fix ComposVisitor dropping position info with -l#569
zafer-esen wants to merge 1 commit into
BNFC:masterfrom
zafer-esen:master

Conversation

@zafer-esen

Copy link
Copy Markdown

When -l is used, the parser sets line_num, col_num, and offset on AST nodes. ComposVisitor reconstructs nodes using constructors, which don't include position fields, losing position info.

The fix passes RecordPositions into cf2ComposVisitor, which now copies position fields from the original node to the new node. Includes a doctest and a changelog entry.

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