Skip to content

feat(parser,editor): enrich AST with precise location data#369

Merged
nlopes merged 1 commit intomainfrom
nlopes-more-locations
Feb 24, 2026
Merged

feat(parser,editor): enrich AST with precise location data#369
nlopes merged 1 commit intomainfrom
nlopes-more-locations

Conversation

@nlopes
Copy link
Owner

@nlopes nlopes commented Feb 24, 2026

Add location fields to parser AST types.

This then helps the editor highlighter so that it doesn't need to do calculations in raw text:

  • BlockMetadata.location: covers attribute/anchor/title lines (I don't particularly like this but it is what it is)
  • DelimitedBlock.open/close_delimiter_location: delimiter line positions
  • DescriptionListItem.delimiter_location: position of ::, :::, etc.

Add location fields to parser AST types.

This then helps the editor highlighter so that it doesn't need to do calculations in raw
text:

- BlockMetadata.location: covers attribute/anchor/title lines (I don't particularly like this but it is what it is)
- DelimitedBlock.open/close_delimiter_location: delimiter line positions
- DescriptionListItem.delimiter_location: position of ::, :::, etc.
@nlopes nlopes merged commit 94fcba3 into main Feb 24, 2026
3 checks passed
@nlopes nlopes deleted the nlopes-more-locations branch February 24, 2026 23:17
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