from Models.Interpreter.Datatypes import Datatypes from Models.Token.TokenValueTypes import FormatCharacters, Booleans, Keywords, ExpressionCharacters class Repo: def __init__(self) -> None: self.debug = True self.line_number: int = 0 # interpreter self.keywords = [ # define keywords Keywords.Library.value, Keywords.Class.value, Keywords.Function.value, Keywords.Variable.value, Keywords.Use.value, Keywords.From.value, # builtin functions Keywords.Output.value, Keywords.Input.value, Keywords.Length.value, Keywords.Range.value, Keywords.Exit.value, # normal keywords Keywords.If.value, Keywords.ElseIf.value, Keywords.Else.value, Keywords.Continue.value, Keywords.If.value, Keywords.Return.value, # loops Keywords.While.value, Keywords.For.value, # access Keywords.Public.value, Keywords.This.value ] self.datatypes = [ Datatypes.Empty.value, Datatypes.Any.value, Datatypes.Number.value, Datatypes.String.value, Datatypes.Bool.value, Datatypes.List.value, Datatypes.Dict.value ] self.format_chars = [ FormatCharacters.Left_Brace.value, FormatCharacters.Right_Brace.value, FormatCharacters.Left_Parenthesis.value, FormatCharacters.Right_Parenthesis.value, FormatCharacters.Left_Bracket.value, FormatCharacters.Right_Bracket.value, FormatCharacters.Semicolon.value, FormatCharacters.Colon.value, FormatCharacters.Comma.value, FormatCharacters.Point.value ] self.expr_chars = [ ExpressionCharacters.Plus.value, ExpressionCharacters.Minus.value, ExpressionCharacters.Asterisk.value, ExpressionCharacters.Slash.value, ExpressionCharacters.Equal.value, ExpressionCharacters.Caret.value ] self.bool_expr_chars = ['<', '>', '!', '!=', '==', '>=', '<=', '&&', '||'] self.bool_values = [Booleans.Right.value, Booleans.Wrong.value] # runtime self.error = None