fix parsing bug when declaration didn't end with semicolon