-
Notifications
You must be signed in to change notification settings - Fork 476
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
Allow multi-line recipe signatures #1266
Comments
Hey @casey , I thought I'd take a crack at this. #1272 seems to work with at least one test justfile I've made - I'm still figuring out how the just codebase works, how tests work, etc., and I'm not sure if this is the best way to solve this parsing problem, so I don't want to call this ready for review just yet. I'd appreciate it if you had any suggestions about what to tell the parser to do here. |
Nice! I think the difficulty with the approach in #1272 is that we want to ignore newlines in grammatical sub constructs. So here:
We also want to ignore newlines in parameters, which would require a change to parse-parameter. One potential solution is to switch the parser between eol-sensitive and non eol-sensitive mode. In non EOL sensitive modes, parser functions that checked for tokens/returned tokens would switch the TokenKind of line endings whitespace. I'm not really sure which approach is better, it really depends on how gross the code is for each. |
One of the main pain point for me. |
@jraygauthier Why is it a main pain point to use \ or parentheses? |
@laniakea64: Lol, because I wasn't aware this has been fixed yet (as it appears in v1.15) and was using v1.13: $ just build-debug-features
error: Unknown start of token:
|
33 | build-debug-features: \
| ^
$ just --version
just 1.13.0 I will upgrade a more recent > v1.15 version. Now, to me this ticket should be marked as fixed by PR #1551, right? It might be a good idea to update Q/A #1265 as well. |
Yup, I think this can be closed. |
This came up in #1265. We can do this without requiring a continuation of any kind, just ignore newlines when parsing recipe parameters.
Great first issue!
The text was updated successfully, but these errors were encountered: