printer can identify multiline statements recursively