• I would have expected it to fail due to no newline or semicolon.

    But it were not so

    Anywhere I can find specific rules about when to use and when not to use semicolon?

    Except the reserved word ";with" of course.