# Path: plugins/lib/view_utils.py
# def coorded_substr(view, reg1=None, reg2=None, rel=None):
#     """Returns the string of two coordinate pairs forming a region.
# 
#     The pairs are supporsed to be indexable and have a length of 2.
#     Tuples are preferred.
# 
#     Defaults to the whole buffer.
# 
#         For examples, see `coorded_region`.
#     """
#     return view.substr(coorded_region(view, reg1, reg2))
# 
# def base_scope(view):
#     """Returns the view's base scope.
#     """
#     return view.scope_name(0).split(' ', 1)[0]
# 
# def get_text(view):
#     """Returns the whole string of a buffer. Alias for `coorded_substr(view)`.
#     """
#     return coorded_substr(view)


import re
import os
import json
import yaml
import plistlib
import sublime
from sublime_lib import OutputPanel
from ..view_utils import coorded_substr, base_scope, get_text
    from xml.parsers.expat import ExpatError, ErrorString
    from . import plist_parser
            from xml.sax._exceptions import SAXReaderNotAvailable






# xml.parsers.expat is not available on certain Linux dists, use plist_parser then.
# See https://github.com/SublimeText/AAAPackageDev/issues/19
try:
except ImportError:
    use_plistlib = False
    print("[PackageDev] 'xml.parsers.expat' module not available; "
          "Falling back to bundled 'plist_parser'...")
else:
    use_plistlib = True

###############################################################################

re_js_comments_str = r"""
    ((?:                          # Non-comments

# Path: plugins/lib/view_utils.py
# def coorded_substr(view, reg1=None, reg2=None, rel=None):
#     """Returns the string of two coordinate pairs forming a region.
# 
#     The pairs are supporsed to be indexable and have a length of 2.
#     Tuples are preferred.
# 
#     Defaults to the whole buffer.
# 
#         For examples, see `coorded_region`.
#     """
#     return view.substr(coorded_region(view, reg1, reg2))
# 
# def base_scope(view):
#     """Returns the view's base scope.
#     """
#     return view.scope_name(0).split(' ', 1)[0]
# 
# def get_text(view):
#     """Returns the whole string of a buffer. Alias for `coorded_substr(view)`.
#     """
#     return coorded_substr(view)


# Path: plugins/lib/fileconv/loaders.py
import re
import os
import json
import yaml
import plistlib
import sublime
from sublime_lib import OutputPanel
from ..view_utils import coorded_substr, base_scope, get_text
    from xml.parsers.expat import ExpatError, ErrorString
    from . import plist_parser
            from xml.sax._exceptions import SAXReaderNotAvailable







# xml.parsers.expat is not available on certain Linux dists, use plist_parser then.
# See https://github.com/SublimeText/AAAPackageDev/issues/19
try:
except ImportError:
    use_plistlib = False
    print("[PackageDev] 'xml.parsers.expat' module not available; "
          "Falling back to bundled 'plist_parser'...")
else:
    use_plistlib = True

###############################################################################

re_js_comments_str = r"""
    ((?:                          # Non-comments

          "(?:\\.|[^"\\])*"           # String literal