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

Error: invalid indentation #71

Closed
diegomrsantos opened this issue Jun 6, 2024 · 0 comments
Closed

Error: invalid indentation #71

diegomrsantos opened this issue Jun 6, 2024 · 0 comments

Comments

@diegomrsantos
Copy link
Contributor

diegomrsantos commented Jun 6, 2024

Trying to format:

if  # some conditions:
    2 >= 1 and
    2 >= 1 and
    2 >= 1:
  discard

fails with:

file.nim(3, 1) Error: invalid indentation
file.nim Error: Skipped file, formatted output cannot be parsed (bug! 86fc4cd)

Nim compiles it with no issues.

arnetheduck added a commit that referenced this issue Jul 19, 2024
When a comment appears after keywords with conditionals, it's an open
question how to format them: they could stay there but this causes
trouble with indent of long/non-trivial conditions - instead of coming
up with a clever solution, this PR simply moves the comment out of
there.
arnetheduck added a commit that referenced this issue Jul 19, 2024
When a comment appears after keywords with conditionals, it's an open
question how to format them: they could stay there but this causes
trouble with indent of long/non-trivial conditions - instead of coming
up with a clever solution, this PR simply moves the comment out of
there.
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