parinfer / parinfer.js

Let's simplify the way we write Lisp
https://shaunlebron.github.io/parinfer
MIT License
1.76k stars 40 forks source link

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

Open shaunlebron opened 7 years ago

shaunlebron commented 7 years ago

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

We can return parentExpressionHack false if:

shaunlebron commented 7 years ago

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

added: https://github.com/shaunlebron/parinfer/commit/e48455d85bcdb6ad50cbc1f56906e276b2d0ae6e

shaunlebron commented 7 years ago

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