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 a compiler from scrapscript to JS #90

Draft
wants to merge 14 commits into
base: trunk
Choose a base branch
from
Draft

Conversation

tekknolagi
Copy link
Owner

This is a hacky prototype but shows how easy it would be to compile scrapscript->JS in scrapscript. Once I get tests for this working I would like to re-write in scrapscript and land that instead.

@@ -1254,6 +1255,91 @@ def bencode(obj: object) -> bytes:
raise NotImplementedError(f"bencode not implemented for {type(obj)}")


class JSCompiler:
Copy link
Collaborator

Choose a reason for hiding this comment

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

🙏 you know what I'm thinking

Copy link
Collaborator

Choose a reason for hiding this comment

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

imports are our friends

Copy link
Owner Author

Choose a reason for hiding this comment

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

This is just a prototype before doing it in scrap

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.

2 participants