katsaii / catspeak-lang

A cross-platform modding language for GameMaker games.
https://www.katsaii.com/catspeak-lang/
MIT License
92 stars 6 forks source link

Question regarding curly bracket position in function definition #56

Closed JujuAdams closed 1 year ago

JujuAdams commented 1 year ago

Is it intentional that

main = fun()
{
    //Body
}

throws an error whereas

main = fun() {
    //Body
}

does not?

katsaii commented 1 year ago

Yes, each new line character is considered a statement termination. I might try and see if I can figure out a way to make this syntax work, but no promises.

JujuAdams commented 1 year ago

If that's the syntax that's the syntax, I think it's ok to be opinionated here.

If possible, it would be good to slide a helpful comment into the error message to point people to the right syntax.