JuliaSyntax.jl icon indicating copy to clipboard operation
JuliaSyntax.jl copied to clipboard

`a b` in REPL treated as incomplete

Open JeffBezanson opened this issue 3 years ago • 1 comments

If I enter

julia> a b<enter>

it waits for more input. This should be an immediate "extra token" error.

JeffBezanson avatar Oct 04 '22 20:10 JeffBezanson

Also happens for 1)).

JeffBezanson avatar Oct 04 '22 20:10 JeffBezanson

I think this issue has been resolved. So, this issue can be closed or am I missing something @c42f?

image

thekushalgaikwad avatar Mar 31 '23 13:03 thekushalgaikwad

I tried this on 1.7, 1.8, and 1.9 and it seems to work correctly on all of them. So I am confused about when this actually was a problem.

KristofferC avatar Mar 31 '23 14:03 KristofferC

That's puzzling, this reproduces easily for me if I type a b\n (just a single \n)

@kushal140 you need JuliaSyntax.enable_in_core!() to enable the new parser?

c42f avatar Mar 31 '23 18:03 c42f

No , I directly ran the codes on repl. No changes were made or different parser was configured .

The result shown is for standard parser.

thekushalgaikwad avatar Mar 31 '23 18:03 thekushalgaikwad

Wait, I thought I was in the julia repo and this was with the standard parser..

KristofferC avatar Mar 31 '23 18:03 KristofferC

The result shown is for standard parser.

That point is that JuliaSyntax is not yet the standard parser, so you need to enable it or it won't be used in the REPL.

c42f avatar Mar 31 '23 19:03 c42f