# M0001 syntax error (/docs/diagnostics/codes/m0001)

<Diagnostic code="M0001" />

The position is where the parser gave up, which is often just after the real mistake: look at the end of the previous line for a missing bracket, comma or operand.

## The mistake and the fix [#the-mistake-and-the-fix]

<div className="code-pair">

```go title="The mistake"
func main() {
	x := 1 +
}
```

```go title="Fixed"
func main() {
	x := 1 + 2 // [!code highlight]
	_ = x // [!code highlight]
}
```

</div>

## The fix [#the-fix]

Complete the expression or statement, or close the open bracket.

See also [all error codes](/docs/diagnostics/codes) and [marmot explain](/docs/commands/explain).