JetJadeja / Tanzine

A Programming Language Interpreted in Python.
MIT License
6 stars 0 forks source link

Python Error Not Covered By Parser: (IndexError: list index out of range) #42

Open Tater-Bot opened 4 years ago

Tater-Bot commented 4 years ago

A Python error occurred when running this Tanzine: https://discordapp.com/channels/731302554784235520/732672011171659828/757756573664673833

Tanzine Code:

@FUNC@ <mult> [@num1,@num2] {
@VAR@ t = @MATH@ @num1 * @num2
@RETURN@ t
}

@VAR@ x = @RUN@ (<mult>,1,5)
@RUN@ (/print,@x)

Python Error:

Traceback (most recent call last):
  File "run.py", line 10, in <module>
    parser.Parse()
  File "/root/tanzine-bot/tokens.py", line 362, in Parse
    self.run_functions(func, args)
  File "/root/tanzine-bot/tokens.py", line 457, in run_functions
    self.Parse()
  File "/root/tanzine-bot/tokens.py", line 288, in Parse
    following_values = [line[index + 1].value, line[index + 2].value, line[index + 3].value]
IndexError: list index out of range