JunoLab / uber-juno

Installer package for the Juno IDE
MIT License
201 stars 39 forks source link

Some syntax variants are not detected properly #57

Closed fbruetting closed 6 years ago

fbruetting commented 6 years ago

When the cursor is at the first line of the following expression and Shift + Enter is pressed, an error is returned, because the instruction is aborted right after the equal sign – and thus doesn’t contain the full expression (though it’s valid Julia syntax):

bla =
[
    1,
    2,
]

Just the following works:

bla = [
    1,
    2,]

Also commented lines inside of a larger function execution leads to an error:

plot(a, b,
    xlab = "bla",       #   xticks = 0:0.5:3,
)
pfitzseb commented 6 years ago

Yeah, this happens because our current code-block-finding is indentation based. So e.g.

plot(a, b,
    xlab = "bla",       #   xticks = 0:0.5:3,
    )

does work.

pfitzseb commented 6 years ago

Closing in favour of https://github.com/JunoLab/CodeTools.jl/issues/9.