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

Store source location of (almost) everything #2174

Merged
merged 18 commits into from
Jun 7, 2023

Conversation

janmasrovira
Copy link
Collaborator

@janmasrovira janmasrovira commented Jun 5, 2023

This pr improves formatting of source files with comments.
The concrete ast now stores location information of almost all keywords.
We do not store location information of parentheses. Comments will be pushed out of parentheses by the formatter.
E.g.

( -- comment
 f x)

will become

-- comment
(f x)

This only occurs if the comment appears just after the (. So the following will be respected

(f --comment
x)

@janmasrovira janmasrovira self-assigned this Jun 5, 2023
@janmasrovira janmasrovira linked an issue Jun 5, 2023 that may be closed by this pull request
@janmasrovira janmasrovira force-pushed the 2162-store-source-location-of-everything branch 3 times, most recently from 994a179 to 40b64c8 Compare June 6, 2023 14:13
@janmasrovira janmasrovira added this to the 0.4.1 milestone Jun 7, 2023
@janmasrovira janmasrovira force-pushed the 2162-store-source-location-of-everything branch from 2a5fc33 to c7abcbd Compare June 7, 2023 09:54
@janmasrovira janmasrovira marked this pull request as ready for review June 7, 2023 09:54
jonaprieto
jonaprieto previously approved these changes Jun 7, 2023
@jonaprieto jonaprieto force-pushed the 2162-store-source-location-of-everything branch from c12f037 to e4abd53 Compare June 7, 2023 16:21
@jonaprieto jonaprieto modified the milestones: 0.4.1, 0.4 - Prague Jun 7, 2023
@jonaprieto jonaprieto force-pushed the 2162-store-source-location-of-everything branch from e4abd53 to dacac48 Compare June 7, 2023 16:48
@jonaprieto jonaprieto merged commit b7b0e10 into main Jun 7, 2023
@jonaprieto jonaprieto deleted the 2162-store-source-location-of-everything branch June 7, 2023 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Store source location of everything
2 participants