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

As of 1.0, the first infix operator is an identifier

Open tecosaur opened this issue 3 months ago • 2 comments

I've been going through more of the JuliaSyntax v1.0 changes for JuliaSyntaxHighlighting, and I've come across one that seems like it could be a bug. In v0.4.10 I see this:

julia> parseall(GreenNode, "x + y + z")
     1:9      │[toplevel]
     1:9      │  [call]
     1:1      │    Identifier           ✔
     2:2      │    Whitespace
     3:3      │    +                    ✔
     4:4      │    Whitespace
     5:5      │    Identifier           ✔
     6:6      │    Whitespace
     7:7      │    +
     8:8      │    Whitespace
     9:9      │    Identifier           ✔

While in 1.0.2 I see:

julia> parseall(GreenNode, "x + y + z")
     1:9      │[toplevel]
     1:9      │  [call]
     1:1      │    Identifier           ✔
     2:2      │    Whitespace
     3:3      │    Identifier           ✔
     4:4      │    Whitespace
     5:5      │    Identifier           ✔
     6:6      │    Whitespace
     7:7      │    +
     8:8      │    Whitespace
     9:9      │    Identifier           ✔

The first + is now a K"Identifier" not a K"+".

tecosaur avatar Aug 28 '25 11:08 tecosaur

Dup of https://github.com/JuliaLang/JuliaSyntax.jl/issues/548 I think

KristofferC avatar Aug 28 '25 13:08 KristofferC

Ah yup, looks like it, it didn't come up when searching for "infix".

That said, it seems like the MWE I share is unchanged when using v2.0.0-DEV via add JuliaSyntax#main.

tecosaur avatar Aug 28 '25 15:08 tecosaur