# 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:


from weakref import *
from pyrser import fmt
from pyrser.grammar import *

#
# TODO: define TypeExpr DSL to write Type Compent's Tree in a easy way.
# example:
#   int
#   list<string>
#   map<string, int>
#   *<int>
#   *[size=20]<char> : array size as attribute of type *
#   *[const]<char[const]> : attribute syntaxe []
#   *[size=20,const]<char> : array size as attribute of type *


class TypeName:
    def __init__(self, name: str=None):
        self.name = name
        self.attributes = {}

    def set_attr(self, name: str, value=None):
        self.attributes[name] = value

    def get_attr(self, name: str) -> object:
        return self.attributes[name]


# 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/type_system/type_expr.py
from weakref import *
from pyrser import fmt
from pyrser.grammar import *


#
# TODO: define TypeExpr DSL to write Type Compent's Tree in a easy way.
# example:
#   int
#   list<string>
#   map<string, int>
#   *<int>
#   *[size=20]<char> : array size as attribute of type *
#   *[const]<char[const]> : attribute syntaxe []
#   *[size=20,const]<char> : array size as attribute of type *


class TypeName:
    def __init__(self, name: str=None):
        self.name = name
        self.attributes = {}

    def set_attr(self, name: str, value=None):
        self.attributes[name] = value

    def get_attr(self, name: str) -> object:
        return self.attributes[name]


    def to_fmt(self) -> fmt.indentable: