JuliaLang / JuliaSyntax.jl

The Julia compiler frontend
Other
272 stars 35 forks source link

Unclear error message for invalid string #355

Open ParadaCarleton opened 1 year ago

ParadaCarleton commented 1 year ago

New users may not know that $ (or some other character) has a special meaning in Julia, in which case this error is confusing:

julia> str = "hello $x$"
ERROR: ParseError:
# Error @ REPL[26]:1:17
str = "hello $x$"
#               └ ── identifier or parenthesized expression expected after $ in string
kettogg commented 9 months ago

Hi @c42f, is this issue fixed? I am a new contributor and want to work on it ^^'

ParadaCarleton commented 9 months ago

Hi @c42f, is this issue fixed? I am a new contributor and want to work on it ^^'

Nope, but this looks like a great first issue! Feel free to make a PR :)

jefft commented 8 months ago

I don't see anything 'unclear' about the error message. But it would be nice if the error message nudged me in the right direction:

identifier or parenthesized expression expected after $ in string. Did you want a raw"..." string literal?