Make sure your opening curly-brace for each parameter block is on the same line as the closing curly-brace of the previous parameter block, otherwise you'll get that error.
Taking only content
and footer
as an example:
<!-- this will work -->
@Main(){
<p>Content</p>
} {
<p>Footer</p>
}
<!-- this won't -->
@Main(){
<p>Content</p>
}
{
<p>Footer</p>
}