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

JuvixTree parser and pretty printer #2583

Merged
merged 28 commits into from
Jan 24, 2024
Merged

JuvixTree parser and pretty printer #2583

merged 28 commits into from
Jan 24, 2024

Conversation

lukaszcz
Copy link
Collaborator

@lukaszcz lukaszcz commented Jan 16, 2024

This PR implements:

  • JuvixTree parser.
  • JuvixTree pretty printer.
  • juvix dev tree read file.jvt command which reads and pretty prints a JuvixTree file.
  • The tree target in the compile command.
  • Removal of StackRef in JuvixAsm. This makes JuvixAsm more consistent with JuvixTree and simplifies the data structures. StackRef is not needed for compilation from Core.

Tests for the parser will appear in a separate PR, when I implement an automatic translation of JuvixAsm to JuvixTree files.

@lukaszcz lukaszcz added this to the 0.6.0 milestone Jan 16, 2024
@lukaszcz lukaszcz self-assigned this Jan 16, 2024
@lukaszcz lukaszcz marked this pull request as ready for review January 18, 2024 18:54
@lukaszcz lukaszcz mentioned this pull request Jan 22, 2024
@lukaszcz lukaszcz mentioned this pull request Jan 23, 2024
Copy link
Collaborator

@janmasrovira janmasrovira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be noted that Asm no longer has StackRef

app/Commands/Dev/Asm/Compile.hs Outdated Show resolved Hide resolved
Copy link
Collaborator

@janmasrovira janmasrovira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

have a look at #2592

Use `makeSem` to minimize lines and replace `send` with type
annotations.
@lukaszcz lukaszcz merged commit e5ea085 into main Jan 24, 2024
4 checks passed
@lukaszcz lukaszcz deleted the tree-parser branch January 24, 2024 11:45
paulcadman pushed a commit that referenced this pull request Jan 25, 2024
* Implements a translation from JuvixAsm to JuvixTree. It does not work
in general, but works for all code generated from Juvix and all JuvixAsm
tests.
* Adds the `juvix dev tree from-asm` command.
* Adds tests automatically converted from JuvixAsm tests.
* Depends on #2583
paulcadman pushed a commit that referenced this pull request Jan 25, 2024
* Implements JuvixTree evaluator
* Adds JuvixTree evaluation tests
* Adds the `juvix dev tree eval` command
* Depends on #2587 
* Depends on #2583
janmasrovira pushed a commit that referenced this pull request Jan 27, 2024
* Adds the `juvix dev tree compile` CLI command.
* Depends on #2589 
* Depends on #2587 
* Depends on #2583
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.

3 participants