JunoLab / Juno.jl

MIT License
144 stars 23 forks source link

[BUG] Multiline evaluation is whitespace sensitive #534

Open felixcremer opened 4 years ago

felixcremer commented 4 years ago

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

pfitzseb commented 4 years ago

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.