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

parent expression hack - notify when it will not work #148

Open
shaunlebron opened this issue Jul 22, 2017 · 2 comments
Open

parent expression hack - notify when it will not work #148

shaunlebron opened this issue Jul 22, 2017 · 2 comments

Comments

@shaunlebron
Copy link
Collaborator

Plugins may use a hack to quickly locate top-level expressions—by finding lines starting with (, [, or {.

We can return parentExpressionHack false if:

  • top-level expression starts a x > 0
  • line inside a string starts with (, {, or {
@shaunlebron
Copy link
Collaborator Author

shaunlebron commented Jul 29, 2017

parens is an array of top-level expressions {lineNo, x, closer, children} that is returned if returnParens is enabled.

added: shaunlebron/parinfer@e48455d

@shaunlebron
Copy link
Collaborator Author

i'll leave this open since it's not a full solution

@shaunlebron shaunlebron reopened this Jul 29, 2017
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