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

Feat: Additional Output Formats #1

Open
z80dev opened this issue Oct 29, 2024 · 1 comment
Open

Feat: Additional Output Formats #1

z80dev opened this issue Oct 29, 2024 · 1 comment

Comments

@z80dev
Copy link
Owner

z80dev commented Oct 29, 2024

We should have some more output options to show some useful stuff.

Initial ideas:

--asm: output assembly, basically all the opcodes right before we turn them into bytes
--ast: output an AST, basically the object we get after calling `syntax->datum` in the compilation phases pipeline 

In puff/puff.rkt we have a few functions that set up some compilation pipelines. To implement these alternative outputs, the easiest way would be to define new functions there, and then in main.rkt hook those functions up to the right cli flags.

Documentation for the cli flag stuff we're using can be found here

@z80dev
Copy link
Owner Author

z80dev commented Oct 29, 2024

this part of the code is already pretty repetitive which isn't always great

it is however really clear and explicit exactly which stages of the compilation pipeline each function calls, and maybe that explicitness is worth the repetitiveness

its possible this gets rewritten in the future but it still would be useful to have this implemented

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

No branches or pull requests

1 participant