aboutsummaryrefslogtreecommitdiff
path: root/compilador
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-11-25 22:08:02 -0600
committerIván Ávalos <avalos@disroot.org>2022-11-25 22:08:02 -0600
commitfeaf7812e80af2646d1098d2d6af5e828c6e7dde (patch)
tree1a70e08bb77842dd3b113385ef3787cc1faa3f33 /compilador
parent6623f6c35f08b08a1e4dddfc3209acdaa57dcc8d (diff)
downloadjavanol-feaf7812e80af2646d1098d2d6af5e828c6e7dde.tar.gz
javanol-feaf7812e80af2646d1098d2d6af5e828c6e7dde.tar.bz2
javanol-feaf7812e80af2646d1098d2d6af5e828c6e7dde.zip
Se añade README, licencia y graphable.py (oops)
Diffstat (limited to 'compilador')
-rw-r--r--compilador/astree/graphable.py9
-rw-r--r--compilador/main.py2
2 files changed, 9 insertions, 2 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
diff --git a/compilador/main.py b/compilador/main.py
index 03f7174..48fb129 100644
--- a/compilador/main.py
+++ b/compilador/main.py
@@ -1,7 +1,5 @@
import sys, getopt, os, traceback
from enum import Enum
-from tkinter import *
-from tkinter import ttk, filedialog
from lexer import *
class Step(Enum):