Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax error message strips whitespace and comments #56544

Open
llbit opened this issue Nov 13, 2024 · 0 comments
Open

Syntax error message strips whitespace and comments #56544

llbit opened this issue Nov 13, 2024 · 0 comments

Comments

@llbit
Copy link
Contributor

llbit commented Nov 13, 2024

Is this intended behavior? It might get confusing if a syntax error does not always match the actual source text:

julia> &#= not an infix operator :( =#3
ERROR: syntax: invalid syntax &3 around REPL[15]:1
Stacktrace:
 [1] top-level scope
   @ REPL[15]:1

julia> &           #=
       =#           3
ERROR: syntax: invalid syntax &3 around REPL[16]:1
Stacktrace:
 [1] top-level scope
   @ REPL[16]:1

julia> &               3
ERROR: syntax: invalid syntax &3 around REPL[17]:1
Stacktrace:
 [1] top-level scope
   @ REPL[17]:1

Version info:

julia> versioninfo()
Julia Version 1.11.0
Commit 501a4f25c2b (2024-10-07 11:40 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 PRO 4750U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver2)
Threads: 1 default, 0 interactive, 1 GC (on 16 virtual cores)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant