<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _process_newline(self, char):
 """ Process a newline character. """


        state = self._state

        # inside string, just append char to token
        if state == self.ST_STRING:
            self._token_chars.append(char)
        else:
            # otherwise, add new token
            self._new_token()

        self._line_no += 1  # update line counter

        # finished with comment
        if state == self.ST_COMMENT:
            self._state = self.ST_TOKEN