improved interpreter WIP

This commit is contained in:
weckyy702
2020-12-28 16:42:30 +01:00
parent c3a61da020
commit 978d4bf9d2
4 changed files with 407 additions and 101 deletions

View File

@@ -29,6 +29,15 @@ class NassiShneidermanDiagram:
h += inst.getblksize()
return int(h)
def _save_scope(self, scope_name: str, scope_instructions: List[Iinstruction]):
"""DEBUGING ONLY"""
image_y_sz = 1000
x, y, = 0, 0
with NSD_writer(f"./{scope_name}", 1000, image_y_sz):
x, y = 0, 0
for instruction in scope_instructions:
x, y = instruction.to_image(x, y, 1000)
def convert_to_image(self, output_path: str, filename: str, x_size: int=200):
for i in range(len(self.scopes)):
filepath = f"{output_path}/{filename}#{i}"