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 TypedSyntax package #353

Merged
merged 9 commits into from
Mar 2, 2023
Merged

Add TypedSyntax package #353

merged 9 commits into from
Mar 2, 2023

Conversation

timholy
Copy link
Member

@timholy timholy commented Feb 28, 2023

This package attempts to map statements in type-inferred code back to the source code as written by the programmer.

The intention is to use this in Cthulhu to present the results of inference in an easier-to-digest form. There are, of course, potential additional applications of this source-mapping, which is why it is developed as a semi-independent package.

This is part of #345, split out so it can be registered before making Cthulhu dependent on it.

This package attempts to map statements in type-inferred code back
to the source code as written by the programmer.

The intention is to use this in Cthulhu to present the results of
inference in an easier-to-digest form. There are, of course, potential
additional applications of this source-mapping, which is why it is
developed as a semi-independent package.
This also elides Core.Const more systematically
@timholy
Copy link
Member Author

timholy commented Feb 28, 2023

Nice, one can run the TypedSyntax tests as part of CI even before Cthulhu knows about this package. Makes sense, but still nice.

TypedSyntax/src/node.jl Outdated Show resolved Hide resolved
TypedSyntax/src/show.jl Outdated Show resolved Hide resolved
TypedSyntax/README.md Outdated Show resolved Hide resolved
timholy and others added 3 commits March 1, 2023 10:18
This substantial refactor handles types and pre/post
"wrapping" (in parenthesis) from the caller rather than the
callee. This more precisely wraps type annotations.
@timholy
Copy link
Member Author

timholy commented Mar 2, 2023

I added Expr(:static_parameter, i) support, thanks for contributing it.

It's starting to feel decent, though future changes are a certainty. Unless there are objections, I'll merge and register later today.

@timholy timholy merged commit ed51dac into master Mar 2, 2023
@timholy timholy deleted the teh/typedsyntax branch March 2, 2023 15:09
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.

3 participants