ElseDeclaration module

class Interpreters.Conditional.ElseDeclaration.ElseDeclaration(token_index: int, token_array=None, interpreter=None)

Bases: Interpreters.Expression.Expression

Performs the creation of an object of type ElseDeclaration

Parameters
  • token_index – index of list tokens

  • token_array – list tokens

  • interpreter – a copy of interpreter with all GLCs

else_dec_exp()

Check the GLC of ElseDeclaration and return the Else AST. In addition, will execute the interpreter to check block of codes inside the else

run_glc()

Run the GLC of ElseDeclaration and will return the node based on BinOp and custom logs.