You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Expr(:incomplete) detection more robust to whitespace (#538)
Rework incomplete expression detection so that trailing whitespace is
always ignored, regardless of how the parser itself decides to attach it
to other nodes of the tree.
To do this, we walk back from the end of the parse stream and look for
the byte offset of the last non-whitespace token. We then use that to
determine whether the error node is "at the end of the parse".
Improve testing by
* Extracting the incomplete expressions which are part of the REPL
stdlib tests and ensuring these match the incomplete tag generation of
the flisp parser. Fix some divergences for `var""` syntax and invalid
escape sequences in strings.
* Ensuring that we test both `:statement` and `:all` level parsing - the
REPL uses `:all` to allow parsing of multiple top level statements, so
we need to test this.
Also fix a minor bug where `enable_in_core!(false)` would result in the
flisp parser being used, regardless of whether `VERSION` ships with
JuliaSyntax enabled by default.
Fixes#519. See also #518.
0 commit comments