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

no error for over-long character literal

Open JeffBezanson opened this issue 3 years ago • 1 comments

I get

julia> 'abc'
'a': ASCII/Unicode U+0061 (category Ll: Letter, lowercase)

Should be

julia> 'abc'
ERROR: syntax: character literal contains multiple characters

JeffBezanson avatar Oct 04 '22 20:10 JeffBezanson

This is part of a broader problem with diagnostics not being present in validating string->value conversions. The general fix for these kind of issues will be something like https://github.com/JuliaLang/JuliaSyntax.jl/issues/82#issuecomment-1232317622

c42f avatar Oct 12 '22 01:10 c42f

This was somewhat improved as a side effect of #121 but still needs a more systematic fix.

c42f avatar Oct 29 '22 01:10 c42f

Also related to this - invalid escape sequences don't give a useful error.

c42f avatar Nov 01 '22 07:11 c42f