E3002#
This source files contains errors in the syntax of the code.
Erroneous example#
fn main() -> Unit {
println("Hello, world!"
}
This example gives the following error on line 3:
Parse error, unexpected token `}`, you may expect `,` or `)`.
... which indicates a missing closing parenthesis ()
) in the println
function call.
Suggestion#
Change your code to strictly follow the MoonBit syntax rules.
In the above example, the missing closing parenthesis should be added:
fn main {
println("Hello, world!")
}