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

Tools and Documentation #169

Open
Ratstail91 opened this issue Dec 27, 2024 · 2 comments
Open

Tools and Documentation #169

Ratstail91 opened this issue Dec 27, 2024 · 2 comments
Labels
feature New feature or request in progress I am currently working on this TODO A planned addition tooling Tbis is related to external tools

Comments

@Ratstail91
Copy link
Owner

Ratstail91 commented Dec 27, 2024

(Original outline is at #126)

Documentation:

  • v2 documentation

Debugging tools:

  • pretty-print the AST
  • pretty-print the bytecode
  • pretty-print the structures
  • optimiser that can rework an existing AST
  • VSCode syntax highlighting

Optimisations applied to the AST:

  • literal folding
  • raw string concat
  • grouping removal
  • string duplication (see String reuse in the bytecode #168)
  • removing excess scopes
  • always-true and always-false conditionals
@Ratstail91 Ratstail91 added feature New feature or request TODO A planned addition tooling Tbis is related to external tools labels Dec 27, 2024
@Ratstail91
Copy link
Owner Author

Disassembler

A tool for picking apart the bytecode, and displaying the data at the opcode level.

This might be my next task, as disassembling around 100 bytes by hand took multiple hours. Going forward, there will be more and more complexity, so it'll save a lot of time and brain power.

The output would likely resemble this:

https://github.com/Ratstail91/Toy/blob/23eb3e45df685fcd65d44787b590f1879e886041/.notes/disassembly.txt

@Ratstail91
Copy link
Owner Author

The branch v2-docs is now being pushed to a mirror repo for deployment, and is visible at https://v2.toylang.com/

I'll start on writing the docs properly - likely as the next step.

@Ratstail91 Ratstail91 added the in progress I am currently working on this label Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request in progress I am currently working on this TODO A planned addition tooling Tbis is related to external tools
Projects
None yet
Development

No branches or pull requests

1 participant