# Path: strictyaml/ruamel/error.py
# class MarkedYAMLError(YAMLError):
#     def __init__(
#         self,
#         context=None,
#         context_mark=None,
#         problem=None,
#         problem_mark=None,
#         note=None,
#         warn=None,
#     ):
#         # type: (Any, Any, Any, Any, Any, Any) -> None
#         self.context = context
#         self.context_mark = context_mark
#         self.problem = problem
#         self.problem_mark = problem_mark
#         self.note = note
#         # warn is ignored
# 
#     def __str__(self):
#         # type: () -> Any
#         lines = []  # type: List[str]
#         if self.context is not None:
#             lines.append(self.context)
#         if self.context_mark is not None and (
#             self.problem is None
#             or self.problem_mark is None
#             or self.context_mark.name != self.problem_mark.name
#             or self.context_mark.line != self.problem_mark.line
#             or self.context_mark.column != self.problem_mark.column
#         ):
#             lines.append(str(self.context_mark))
#         if self.problem is not None:
#             lines.append(self.problem)
#         if self.problem_mark is not None:
#             lines.append(str(self.problem_mark))
#         if self.note is not None and self.note:
#             note = textwrap.dedent(self.note)
#             lines.append(note)
#         return "\n".join(lines)
# 
# Path: strictyaml/ruamel/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
#     class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#             def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):


from strictyaml.ruamel.error import MarkedYAMLError
from strictyaml.ruamel.tokens import *  # NOQA
from strictyaml.ruamel.compat import (
    utf8,
    unichr,
    PY3,
    check_anchorname_char,
    nprint,
)  # NOQA
    from typing import Any, Dict, Optional, List, Union, Text  # NOQA
    from strictyaml.ruamel.compat import VersionType  # NOQA
                length += 1
            if length != 0:
                chunks.append(self.reader.prefix(length))
                srf(length)
            ch = srp()
            if not double and ch == "'" and srp(1) == "'":
                chunks.append("'")
                srf(2)
            elif (double and ch == "'") or (not double and ch in '"\\'):
                chunks.append(ch)
                srf()
            elif double and ch == "\\":
                srf()
                ch = srp()
                if ch in self.ESCAPE_REPLACEMENTS:
                    chunks.append(self.ESCAPE_REPLACEMENTS[ch])
                    srf()
                elif ch in self.ESCAPE_CODES:
                    length = self.ESCAPE_CODES[ch]
                    srf()
                    for k in range(length):
                        if srp(k) not in "0123456789ABCDEFabcdef":
                            raise ScannerError(
                                "while scanning a double-quoted scalar",
                                start_mark,
                                "expected escape sequence of %d hexdecimal "
                                "numbers, but found %r" % (length, utf8(srp(k))),
                                self.reader.get_mark(),
                            )
                    code = int(self.reader.prefix(length), 16)

# Path: strictyaml/ruamel/error.py
# class MarkedYAMLError(YAMLError):
#     def __init__(
#         self,
#         context=None,
#         context_mark=None,
#         problem=None,
#         problem_mark=None,
#         note=None,
#         warn=None,
#     ):
#         # type: (Any, Any, Any, Any, Any, Any) -> None
#         self.context = context
#         self.context_mark = context_mark
#         self.problem = problem
#         self.problem_mark = problem_mark
#         self.note = note
#         # warn is ignored
# 
#     def __str__(self):
#         # type: () -> Any
#         lines = []  # type: List[str]
#         if self.context is not None:
#             lines.append(self.context)
#         if self.context_mark is not None and (
#             self.problem is None
#             or self.problem_mark is None
#             or self.context_mark.name != self.problem_mark.name
#             or self.context_mark.line != self.problem_mark.line
#             or self.context_mark.column != self.problem_mark.column
#         ):
#             lines.append(str(self.context_mark))
#         if self.problem is not None:
#             lines.append(self.problem)
#         if self.problem_mark is not None:
#             lines.append(str(self.problem_mark))
#         if self.note is not None and self.note:
#             note = textwrap.dedent(self.note)
#             lines.append(note)
#         return "\n".join(lines)
# 
# Path: strictyaml/ruamel/compat.py
# _DEFAULT_YAML_VERSION = (1, 2)
# PY2 = sys.version_info[0] == 2
# PY3 = sys.version_info[0] == 3
#     MAXSIZE = sys.maxsize
# UNICODE_SIZE = 4 if sys.maxunicode > 65535 else 2
# DBG_TOKEN = 1
# DBG_EVENT = 2
# DBG_NODE = 4
#     class ordereddict(OrderedDict):  # type: ignore
#     class ObjectCounter(object):
# class Nprint(object):
# class MutableSliceableSequence(MutableSequence):  # type: ignore
#             def insert(self, pos, key, value):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
#     def utf8(s):
#     def to_str(s):
#     def to_unicode(s):
# def with_metaclass(meta, *bases):
#         def __init__(self):
#         def __call__(self, k):
#         def dump(self):
# def dbg(val=None):
#     def __init__(self, file_name=None):
#     def __call__(self, *args, **kw):
#     def set_max_print(self, i):
# def check_namespace_char(ch):
# def check_anchorname_char(ch):
# def version_tnf(t1, t2=None):
#     def __getitem__(self, index):
#     def __setitem__(self, index, value):
#     def __delitem__(self, index):
#     def __getsingleitem__(self, index):
#     def __setsingleitem__(self, index, value):
#     def __delsingleitem__(self, index):


# Path: strictyaml/ruamel/scanner.py
from strictyaml.ruamel.error import MarkedYAMLError
from strictyaml.ruamel.tokens import *  # NOQA
from strictyaml.ruamel.compat import (
    utf8,
    unichr,
    PY3,
    check_anchorname_char,
    nprint,
)  # NOQA
    from typing import Any, Dict, Optional, List, Union, Text  # NOQA
    from strictyaml.ruamel.compat import VersionType  # NOQA

                length += 1
            if length != 0:
                chunks.append(self.reader.prefix(length))
                srf(length)
            ch = srp()
            if not double and ch == "'" and srp(1) == "'":
                chunks.append("'")
                srf(2)
            elif (double and ch == "'") or (not double and ch in '"\\'):
                chunks.append(ch)
                srf()
            elif double and ch == "\\":
                srf()
                ch = srp()
                if ch in self.ESCAPE_REPLACEMENTS:
                    chunks.append(self.ESCAPE_REPLACEMENTS[ch])
                    srf()
                elif ch in self.ESCAPE_CODES:
                    length = self.ESCAPE_CODES[ch]
                    srf()
                    for k in range(length):
                        if srp(k) not in "0123456789ABCDEFabcdef":
                            raise ScannerError(
                                "while scanning a double-quoted scalar",
                                start_mark,
                                "expected escape sequence of %d hexdecimal "
                                "numbers, but found %r" % (length, utf8(srp(k))),
                                self.reader.get_mark(),
                            )
                    code = int(self.reader.prefix(length), 16)

                    chunks.append(unichr(code))