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

[BUG] Multiline evaluation is whitespace sensitive

Open felixcremer opened this issue 6 years ago • 1 comments

Defining a Dict on multiple lines, fails when the following lines are not tabbed:

# This fails with these error messages
a =Dict("x"=>1, # syntax: incomplete: premature end of input
"y" =>2) # syntax: extra token ")" after end of expression

# This works
b =Dict("x"=>1,
    "y" =>2)

Both definitions are fine if I run them in the REPL or via run all in juno.

Details

  • Atom version: 1.40.1

  • Julia version: 1.4.0

  • OS: Ubuntu 18.04

  • Package versions:

    • Atom.jl: v.0.12.9
    • julia-client: 0.12.0
    • ink: 0.12.0

felixcremer avatar Mar 27 '20 09:03 felixcremer

That's by design, basically -- Juno's block detection is based on indentation. We could probably fix cases like this one though, but it's not a high priority.

pfitzseb avatar Mar 27 '20 10:03 pfitzseb