Open Scott-Guest opened 4 months ago
pyk
can definitely do this pretty easily. We can very much use kompile
to read in and produce the AST, and then use pyk
to read in the definition and then write it out again with a new pretty-printer. Pyk's pretty-printer would need some updating.
With some of @gtrepta work, we could probably also do it mostly in pyk, and just do inner parsing using kompile
tooling.
@ehildenb Agreed, @Baltoli and I had similar thoughts.
There is a small gap between parsed outer syntax and the user source that we'll need to address (e.g. desugaring of inline priority declarations into a separate syntax priority
statement), but it should be manageable.
Related:
4222
We should consider creating a tool for round-tripping K source code to AST and back.
This serves two purposes:
.
with.K
<k>
cell insertion