E3002

E3002#

这个源文件包含代码语法错误。

错误示例#

fn main() -> Unit {
  println("Hello, world!"
}

这个例子在第 3 行给出了以下错误:

Parse error, unexpected token `}`, you may expect `,` or `)`.

这表明 println 函数调用中缺少闭合括号()。

建议#

更改你的代码,严格遵循 MoonBit 语法规则。

In the above example, the missing closing parenthesis should be added:

fn main {
  println("Hello, world!")
}