code: def visit_str(self, node, _):
          
  
          # remove surrounding quotes and remove single backslashes
          return self.visit_str.re_single_backslash.sub('', node.text[1:-1])
docs: Regex rule for quoted string allowing escaped quotes inside.
  
          Arguments
          ---------
          node : parsimonious.nodes.Node.
          _ (children) : list, unused
  
          Result
          ------
          str
              The wanted string, with quoted characters unquoted.
  
          Example
          -------
  
          >>> BaseParser('"foo"', default_rule='STR').data
          'foo'
          >>> BaseParser("'foo'", default_rule='STR').data
          'foo'
          >>> BaseParser('''"foo b'ar"''', default_rule='STR').data
          "foo b'ar"
          >>> BaseParser('''"foo b\'ar"''', default_rule='STR').data
          "foo b'ar"
          >>> BaseParser(r"'foo b\\'ar'", default_rule='STR').data
          "foo b'ar"
  
          Notes
          -----
  
          The regex works this way:
              Two quotes (single or double, the starting one and the ending one should be the same)
              surrounding zero or more of "any character that's not a quote (same as the
              starting/ending ones) or a backslash" or "a backslash followed by any character".