def _update_quoting_state(self, ch):
<EOL>is_escaped = self.escaped<EOL>self.escaped = (not self.escaped and<EOL>ch == '<STR_LIT:\\>' and<EOL>self.quotes != self.SQUOTE)<EOL>if self.escaped:<EOL><INDENT>return '<STR_LIT>'<EOL><DEDENT>if is_escaped:<EOL><INDENT>if self.quotes == self.DQUOTE:<EOL><INDENT>if ch == '<STR_LIT:">':<EOL><INDENT>return ch<EOL><DEDENT>return "<STR_LIT>".format('<STR_LIT:\\>', ch)<EOL><DEDENT>return ch<EOL><DEDENT>if self.quotes is None:<EOL><INDENT>if ch in (self.SQUOTE, self.DQUOTE):<EOL><INDENT>self.quotes = ch<EOL>return '<STR_LIT>'<EOL><DEDENT><DEDENT>elif self.quotes == ch:<EOL><INDENT>self.quotes = None<EOL>return '<STR_LIT>'<EOL><DEDENT>return ch<EOL>
Update self.quotes and self.escaped

:param ch: str, current character
:return: ch if it was not used to update quoting state, else ''