func expectBackslash()

in Sources/System/FilePath/FilePathWindows.swift [426:441]


    func expectBackslash() {
      if lexer.eatBackslash() { return }

      // A little gross, but we reset the lexer because the lexer
      // holds a strong reference to `self`.
      //
      // TODO: Intern the empty SystemString. Right now, this is
      // along an uncommon/pathological case, but we want to in
      // general make empty strings without allocation
      let idx = lexer.current
      lexer.clear()
      self.insert(.backslash, at: idx)
      lexer.reset(to: self, at: idx)
      let p = lexer.eatBackslash()
      assert(p)
    }