vapourlang / vapour

Typed superset of R
http://vapour.run
Apache License 2.0
194 stars 3 forks source link

Parser - block statement #29

Open JohnCoene opened 2 months ago

JohnCoene commented 2 months ago

There is an issue in the parser, unsure where/why it occurs.

The following valid Vapour code.

let x: num = 0
let y: num = 0

x = sum(1, 2, 3)
y = sum(1, 2, 3)

Would transpile to (without an ugly trick in the transpiler)

x = sum(1, 2, 3)y = sum(1, 2, 3)

These should be block statements but they are expressions, despite the parser taking into account new lines \n