diff options
author | Iván Ávalos <avalos@disroot.org> | 2022-11-25 22:08:02 -0600 |
---|---|---|
committer | Iván Ávalos <avalos@disroot.org> | 2022-11-25 22:08:02 -0600 |
commit | feaf7812e80af2646d1098d2d6af5e828c6e7dde (patch) | |
tree | 1a70e08bb77842dd3b113385ef3787cc1faa3f33 /compilador/astree | |
parent | 6623f6c35f08b08a1e4dddfc3209acdaa57dcc8d (diff) | |
download | javanol-feaf7812e80af2646d1098d2d6af5e828c6e7dde.tar.gz javanol-feaf7812e80af2646d1098d2d6af5e828c6e7dde.tar.bz2 javanol-feaf7812e80af2646d1098d2d6af5e828c6e7dde.zip |
Se añade README, licencia y graphable.py (oops)
Diffstat (limited to 'compilador/astree')
-rw-r--r-- | compilador/astree/graphable.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compilador/astree/graphable.py b/compilador/astree/graphable.py new file mode 100644 index 0000000..99cfebf --- /dev/null +++ b/compilador/astree/graphable.py @@ -0,0 +1,9 @@ +import graphviz as gv +from typing import Protocol, runtime_checkable +from abc import abstractmethod + +@runtime_checkable +class Graphable(Protocol): + @abstractmethod + def graph(self, dot: gv.Digraph, parent: str = None, edge: str = None) -> None: + raise NotImplementedError |