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

Lexer: Mismatched indentation in arrays and parameter lists should be disallowed #3305

Closed
xixixao opened this issue Jan 4, 2014 · 4 comments
Labels

Comments

@xixixao
Copy link
Contributor

xixixao commented Jan 4, 2014

fn a,
  fn
    b
  fn
    c
# and
[
  a
  fn
    b
  c
]

should throw indentation error. Why is this allowed?

@satyr
Copy link
Collaborator

satyr commented Jan 5, 2014

Mainly to permit:

[ a
  b
  c ]

@xixixao
Copy link
Contributor Author

xixixao commented Jan 5, 2014

That still follows that the 3rd item has the same indent as the 2nd.

@xixixao
Copy link
Contributor Author

xixixao commented Mar 20, 2014

I don't really know into which issue this belongs, but the indentation rules seem waaaaay to lenient:

if a
    b
  c
# if (a) {
#   b;
# }
# c;

@GeoffreyBooth GeoffreyBooth changed the title Disallow mismatched indentation in arrays and parameter lists Lexer: Mismatched indentation in arrays and parameter lists should be disallowed May 6, 2017
@GeoffreyBooth
Copy link
Collaborator

For the sake of backward compatibility, I don’t think we’re changing this now.

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

No branches or pull requests

3 participants