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

Source locations #981

Closed
wants to merge 12 commits into from
Closed

Source locations #981

wants to merge 12 commits into from

Conversation

jonludlam
Copy link
Member

Have stable anchors in rendered source.

jonludlam added 12 commits July 7, 2023 18:09
These should only be referred to by elements on that same source page.
This is in contrast with the `SourceLocation identifier, which uses an
anchor found using the Shapes API, and can refer across source pages.

This commit introduces the constructor but it is currently unused.
This fixes the problem of having anchors that are too dependent on
compiler internals by naming the anchor after the position in the
source of the particular value.
It seems that module types don't have Uids in their shapes, but the
uids exist in the `cmt_uid_to_loc` hashtbl. To preserve the links
to these uids we therefore fall back to non-semantic anchors, e.g.
`def-<n>` as opposed to `module-type-S.type-t`.
@jonludlam
Copy link
Member Author

Closed in favour of #993

@jonludlam jonludlam closed this Sep 14, 2023
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