Skip to content
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

Add support for a relative offset within ast.SourceInfo #836

Merged

Conversation

TristonianJones
Copy link
Collaborator

Introduce support for a base line and column to be computed
by querying offset 0 on the common.Source value provided
to NewSourceInfo.

Previously, the common.Source was used directly within the
parser and implementations could override the behavior of
OffsetLocation and LocationOffset to produce values which
treated the parse input as relative source in some larger context;
however, with the shift away from proto (#789) and toward more
uniform and featureful internal data types, the ast.SourceInfo
object attempted to unify the id to offset relationship and removed
this feature on accident.

@TristonianJones TristonianJones merged commit ea648d7 into google:master Sep 5, 2023
2 checks passed
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