From 3860250e31367b2669815d7defdbf42c6bc57bf5 Mon Sep 17 00:00:00 2001 From: weckyy702 Date: Sun, 28 Mar 2021 12:12:46 +0200 Subject: [PATCH] created development branch --- interpreter/Lexer.py | 8 ++++++++ interpreter/function_scope.py | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 interpreter/Lexer.py diff --git a/interpreter/Lexer.py b/interpreter/Lexer.py new file mode 100644 index 0000000..51adf2f --- /dev/null +++ b/interpreter/Lexer.py @@ -0,0 +1,8 @@ +"""Lexer.py: Definition for Lexer class""" + +from function_scope import Function_scope + +class Lexer: + """This class will lex the provided Java source and generate a list of Function_scopes""" + + diff --git a/interpreter/function_scope.py b/interpreter/function_scope.py index c6ebf7e..02acd12 100644 --- a/interpreter/function_scope.py +++ b/interpreter/function_scope.py @@ -1,12 +1,13 @@ -"""function_scope.py: #TODO""" +"""function_scope.py: Class for Function scopes""" __author__ = "Weckyy702" from typing import Iterable, List from draw.Iinstruction import Iinstruction - class Function_scope(Iterable): + """This class serves as a container for Instructions""" + def __init__(self, child_instructions: List[Iinstruction], name: str, return_type: str, args: List[str]) -> None: self.contents = child_instructions self.name = name