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 support for shebangs #232

Open
jeaye opened this issue Feb 4, 2025 · 1 comment
Open

Add support for shebangs #232

jeaye opened this issue Feb 4, 2025 · 1 comment

Comments

@jeaye
Copy link
Member

jeaye commented Feb 4, 2025

Clojure has reader support for #!. When it sees that pattern, it just ignores the rest of the line. We should update jank to treat #! the same way it treats ;.

This involves updating the lexer to output a comment token when #! is found. We already have the code for handling comments and for detecting #. We just need to add a ! case following # which then reuses the comment code (pull it into a fn named build_comment).

We then need lex tests for the shebang showing up in various places. We can extend the lex comment tests for this.

@bpiel
Copy link
Contributor

bpiel commented Feb 4, 2025

I'll take this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants