Hi, I'm really enjoying the implementation of multi line expressions, I feel it makes the code more readable for objects and other a bit more complex mathjs expressions like this
car = {
speed: 10 m/s,
mass: 1e3 kg,
lenth: 3 m
}
A workaround without multiline expressions was to make an empty object first and then assigning the attributes one by one with the added benefit that it's possible to comment each one
car = {};
car.speed = 10 m/s # speed
car.mass = 1e3 kg # mass
car.length = 3 m # length
One small issue is that it multi line expressions do not work when they are commented in between
car = {
speed: 10 m/s, # speed
mass: 1e3 kg, # mass
lenth: 3 m # length
}
Yielding
SyntaxError: Syntax error in part "
mass: 1e3 kg, # mass
lenth: 3 m # length
}" (char 40)
I understand that this could be fixed by the user by submitting lines without comments to math.parser but please consider the possibility of having comments in between multiline expressions.
Hi, I'm really enjoying the implementation of multi line expressions, I feel it makes the code more readable for objects and other a bit more complex mathjs expressions like this
A workaround without multiline expressions was to make an empty object first and then assigning the attributes one by one with the added benefit that it's possible to comment each one
One small issue is that it multi line expressions do not work when they are commented in between
Yielding
I understand that this could be fixed by the user by submitting lines without comments to
math.parserbut please consider the possibility of having comments in between multiline expressions.