Nim's grammar defines the top-level term to be:
module = stmt ^* (';' / IND{=})
where stmt is:
stmt = (IND{>} complexOrSimpleStmt^+(IND{=} / ';') DED)
/ simpleStmt ^+ ';'
I'm not sure the first term should be stmt, since it disallows complexOrSimpleStmt unless it's indented. Shouldn't the top rule be:
module = complexOrSimpleStmt ^* (';' / IND{=})
which would be consistent with the actual parser implementation?