created development branch
This commit is contained in:
8
interpreter/Lexer.py
Normal file
8
interpreter/Lexer.py
Normal file
@@ -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"""
|
||||||
|
|
||||||
|
|
||||||
@@ -1,12 +1,13 @@
|
|||||||
"""function_scope.py: #TODO"""
|
"""function_scope.py: Class for Function scopes"""
|
||||||
|
|
||||||
__author__ = "Weckyy702"
|
__author__ = "Weckyy702"
|
||||||
|
|
||||||
from typing import Iterable, List
|
from typing import Iterable, List
|
||||||
from draw.Iinstruction import Iinstruction
|
from draw.Iinstruction import Iinstruction
|
||||||
|
|
||||||
|
|
||||||
class Function_scope(Iterable):
|
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:
|
def __init__(self, child_instructions: List[Iinstruction], name: str, return_type: str, args: List[str]) -> None:
|
||||||
self.contents = child_instructions
|
self.contents = child_instructions
|
||||||
self.name = name
|
self.name = name
|
||||||
|
|||||||
Reference in New Issue
Block a user