implemented for loops

This commit is contained in:
weckyy702
2021-01-03 21:48:38 +01:00
parent 04f3efed8e
commit b71ae7ecea
4 changed files with 42 additions and 8 deletions

View File

@@ -1,5 +1,5 @@
from interpreter.interpret_source import Function_scope
from typing import Dict, List
from typing import Dict, List, Optional
import logging
from enum import IntEnum
import os.path
@@ -69,7 +69,7 @@ class NassiShneidermanDiagram:
logging.error(f"Failed to save image {filepath}. Unknown error")
raise
def load_from_file(self, filepath:str, itp_custom_tags: Dict[str, List[str]]):
def load_from_file(self, filepath:str, itp_custom_tags: Optional[Dict[str, List[str]]]):
itp = JavaInterpreter(filepath)
itp.reset_tags(itp_custom_tags)
self.function_scopes = itp.load_instruction_scopes()