From 999e56d35f386bc253dd545b6dd684c2af374ef5 Mon Sep 17 00:00:00 2001 From: weckyy702 Date: Sun, 17 Jan 2021 11:55:12 +0100 Subject: [PATCH] downgraded interpreter to be compatible with python3.8 --- interpreter/interpret_source.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/interpreter/interpret_source.py b/interpreter/interpret_source.py index 876d159..35d25fb 100644 --- a/interpreter/interpret_source.py +++ b/interpreter/interpret_source.py @@ -6,9 +6,6 @@ from typing import Dict, List, Match, Tuple, Union from errors.custom import InterpreterException, JavaSyntaxError, ScopeNotFoundException from draw.Iinstruction import * -if sys.version_info < (3, 9): - raise Exception("Unsupported Python version! Pyton 3.9 is required") - logging.warning("""Because the Interpreter is still WIP, some Java language features are not supported. These include: *foreach loops (will throw JavaSyntaxError) *constructors (will be ignored) @@ -57,13 +54,16 @@ class JavaInterpreter: if additional_tags: if "comments" in additional_tags.keys(): - if tags := additional_tags["comments"]: + tags = additional_tags["comments"] + if tags: self._comment_tags.extend(tags) if "ignore" in additional_tags.keys(): - if tags := additional_tags["ignore"]: + tags = additional_tags["ignore"] + if tags: self._remove_tags.extend(tags) if "types" in additional_tags.keys(): - if tags := additional_tags["types"]: + tags = additional_tags["types"] + if tags: self._type_tags.extend(tags) self._function_tags.extend(tags) else: