# Path: pyrser/meta.py
# def enum(*sequential, **named):
# def checktypes(func):
#     def check_type(sig, arg_name, arg_type, arg_value):
#     def wrapper(*args, **kwargs):
# def set_one(chainmap, thing_name, callobject):
# def _get_base_class(cls):
# def add_method(cls):
#     def wrapper(f):
# def hook(cls, hookname=None, erase=False):
#     def wrapper(f):
# def rule(cls, rulename=None, erase=False):
#     def wrapper(f):
# def directive(directname=None):
#     def wrapper(f):
# def decorator(directname=None):
#     def wrapper(f):
# 
# Path: pyrser/fmt.py
# class indentable:
# class block(indentable):
# class sep(indentable):
# class end(indentable):
# class tab(indentable):
#     def __init__(self):
#     def to_str(self, res: str) -> str:
#     def __str__(self):
#     def lsdata(self) -> list:
#     def set_indent(self, indent: int=1):
# def catend(dst: str, src: str, indent) -> str:
# def list_set_indent(lst: list, indent: int=1):
# def list_to_str(lst: list, content: str, indent: int=1):
#     def __init__(self, beginby: str, endby: str, lsdata: list):
#     def to_str(self, res: str, parent_indent) -> str:
#     def __init__(self, ch: str, lsdata: list):
#     def to_str(self, res: str, parent_indent) -> str:
#     def __init__(self, ch: str, lsdata: list):
#     def to_str(self, res: str, parent_indent) -> str:
#     def __init__(self, lsdata: indentable):
#     def set_indent(self, indent: int=1):
#     def to_str(self, res: str, parent_indent) -> str:
# 
# Path: pyrser/parsing/node.py
# class Node(dict):
# class ListNodeItem:
# class ListNodeItemIterator:
# class DictNode(dict):
# class TupleNode(list):
# class ListNode:
# class ListNodeItem:
# class ListNodeItemIterator:
#     def __bool__(self):
#     def __repr__(self):
#     def check(self, ndict: dict, info="") -> bool:
#         def iscycle(thing, ndict: dict, info: str) -> bool:
#         def recurs(thing, ndict: dict, info: str) -> bool:
#     def clean(self):
#     def set(self, othernode):
#     def __init__(self, it: []=None):
#     def append(self, d):
#     def prepend(self, d):
#     def __eq__(self, oth) -> bool:
#     def __str__(self) -> str:
#     def __repr__(self) -> str:
#     def dump(self) -> str:
#     def __len__(self) -> int:
#     def __iter__(self) -> ListNodeItemIterator:
#     def __reversed__(self) -> ListNodeItemIterator:
#     def _trueindex(self, k) -> int:
#     def _cache(self) -> str:
#     def _update(self):
#     def index(self, data) -> int:
#     def count(self, data) -> int:
#     def get(self, k) -> ListNodeItem:
#     def __getitem__(self, k) -> object:
#     def __setitem__(self, k, d):
#     def __delitem__(self, k):
#     def __init__(self, data):
#     def __str__(self) -> str:
#     def __repr__(self) -> str:
#     def dump(self) -> str:
#     def index(self, v) -> int:
#     def count(self, v) -> int:
#     def _get_slice(self, sl) -> [object]:
#     def __getitem__(self, k) -> object:
#     def __setitem__(self, k, d):
#     def __delitem__(self, k):
#     def popitem(self) -> object:
#     def append(self, data) -> ListNodeItem:
#     def prepend(self, data) -> ListNodeItem:
#     def values(self):
#     def rvalues(self):
#     def _fwd(self):
#     def _bwd(self):
#     def __init__(self, current: ListNodeItem, reverse=False):
#     def __iter__(self):
#     def __next__(self):
# def normalize(ast: Node) -> Node:


from pyrser import meta, fmt
from pyrser.parsing import node
import weakref
# This pass is for debug only

scalar = {'bool': bool, 'int': int, 'float': float, 'str': str}
composed = {'list': list, 'dict': dict, 'set': set}


@meta.add_method(node.Node)
def to_yml(self):
    """
    Allow to get the YML string representation of a Node.::

        from pyrser.passes import to_yml

        t = Node()
        ...
        print(str(t.to_yml()))
    """

# Path: pyrser/meta.py
# def enum(*sequential, **named):
# def checktypes(func):
#     def check_type(sig, arg_name, arg_type, arg_value):
#     def wrapper(*args, **kwargs):
# def set_one(chainmap, thing_name, callobject):
# def _get_base_class(cls):
# def add_method(cls):
#     def wrapper(f):
# def hook(cls, hookname=None, erase=False):
#     def wrapper(f):
# def rule(cls, rulename=None, erase=False):
#     def wrapper(f):
# def directive(directname=None):
#     def wrapper(f):
# def decorator(directname=None):
#     def wrapper(f):
# 
# Path: pyrser/fmt.py
# class indentable:
# class block(indentable):
# class sep(indentable):
# class end(indentable):
# class tab(indentable):
#     def __init__(self):
#     def to_str(self, res: str) -> str:
#     def __str__(self):
#     def lsdata(self) -> list:
#     def set_indent(self, indent: int=1):
# def catend(dst: str, src: str, indent) -> str:
# def list_set_indent(lst: list, indent: int=1):
# def list_to_str(lst: list, content: str, indent: int=1):
#     def __init__(self, beginby: str, endby: str, lsdata: list):
#     def to_str(self, res: str, parent_indent) -> str:
#     def __init__(self, ch: str, lsdata: list):
#     def to_str(self, res: str, parent_indent) -> str:
#     def __init__(self, ch: str, lsdata: list):
#     def to_str(self, res: str, parent_indent) -> str:
#     def __init__(self, lsdata: indentable):
#     def set_indent(self, indent: int=1):
#     def to_str(self, res: str, parent_indent) -> str:
# 
# Path: pyrser/parsing/node.py
# class Node(dict):
# class ListNodeItem:
# class ListNodeItemIterator:
# class DictNode(dict):
# class TupleNode(list):
# class ListNode:
# class ListNodeItem:
# class ListNodeItemIterator:
#     def __bool__(self):
#     def __repr__(self):
#     def check(self, ndict: dict, info="") -> bool:
#         def iscycle(thing, ndict: dict, info: str) -> bool:
#         def recurs(thing, ndict: dict, info: str) -> bool:
#     def clean(self):
#     def set(self, othernode):
#     def __init__(self, it: []=None):
#     def append(self, d):
#     def prepend(self, d):
#     def __eq__(self, oth) -> bool:
#     def __str__(self) -> str:
#     def __repr__(self) -> str:
#     def dump(self) -> str:
#     def __len__(self) -> int:
#     def __iter__(self) -> ListNodeItemIterator:
#     def __reversed__(self) -> ListNodeItemIterator:
#     def _trueindex(self, k) -> int:
#     def _cache(self) -> str:
#     def _update(self):
#     def index(self, data) -> int:
#     def count(self, data) -> int:
#     def get(self, k) -> ListNodeItem:
#     def __getitem__(self, k) -> object:
#     def __setitem__(self, k, d):
#     def __delitem__(self, k):
#     def __init__(self, data):
#     def __str__(self) -> str:
#     def __repr__(self) -> str:
#     def dump(self) -> str:
#     def index(self, v) -> int:
#     def count(self, v) -> int:
#     def _get_slice(self, sl) -> [object]:
#     def __getitem__(self, k) -> object:
#     def __setitem__(self, k, d):
#     def __delitem__(self, k):
#     def popitem(self) -> object:
#     def append(self, data) -> ListNodeItem:
#     def prepend(self, data) -> ListNodeItem:
#     def values(self):
#     def rvalues(self):
#     def _fwd(self):
#     def _bwd(self):
#     def __init__(self, current: ListNodeItem, reverse=False):
#     def __iter__(self):
#     def __next__(self):
# def normalize(ast: Node) -> Node:


# Path: pyrser/passes/to_yml.py
from pyrser import meta, fmt
from pyrser.parsing import node
import weakref

# This pass is for debug only

scalar = {'bool': bool, 'int': int, 'float': float, 'str': str}
composed = {'list': list, 'dict': dict, 'set': set}


@meta.add_method(node.Node)
def to_yml(self):
    """
    Allow to get the YML string representation of a Node.::

        from pyrser.passes import to_yml

        t = Node()
        ...
        print(str(t.to_yml()))
    """

    pp = fmt.tab([])