Skip to content

Track source locations through the AST #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 10, 2021

Conversation

milseman
Copy link
Member

@milseman milseman commented Dec 7, 2021

  • Source range tracking for groups and quantification
  • Overhaul AST to be enum of structs and use protocols for common operations

Still need to track way more source locations, but I think it's important to merge this soon so we can build on it.

@milseman
Copy link
Member Author

Rebased and more fleshed out

@milseman milseman force-pushed the abstract_syntax_orchard branch from 4984d75 to 81e524f Compare December 10, 2021 02:38
Group and Quantification now track source locations,
though many places in parser still fake them.
@milseman milseman force-pushed the abstract_syntax_orchard branch from 81e524f to 118183b Compare December 10, 2021 02:43
@milseman milseman marked this pull request as ready for review December 10, 2021 05:01
@milseman
Copy link
Member Author

@hamishknight can you take a look at this?

@rxwei I fixed the bug where non-capturing groups were saying they were capturing. It wasn't too bad, just had to update some of the legacy compilation test cases.

Copy link
Contributor

@hamishknight hamishknight left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@milseman milseman changed the title [WIP]: Track source locations through the AST Track source locations through the AST Dec 10, 2021
@milseman
Copy link
Member Author

@swift-ci please test linux platform

@milseman milseman merged commit 23ff648 into swiftlang:main Dec 10, 2021
@milseman milseman deleted the abstract_syntax_orchard branch December 10, 2021 15:38
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