JetJadeja / Tanzine

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

Python Error Not Covered By Parser: (AttributeError: 'Parser' object has no attribute 'returned') #35

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/732672699297562814/756634861091160196

Tanzine Code:

@FUNC@ <hello> [@idk] {
  @VAR@ idk = @RUN@ (@idk.encode, 'utf-8')
  @RUN@ (/print,@idk)
  @VAR@ hash = @RUN@ (hashlib/sha256,@idk) 
  @VAR@ final = @RUN@ (@hash.hexdigest())
  @RUN@ (/print,@final)

  @RETURN@
}

@VAR@ hashed = @RUN@ (<hello>, 'beebs')

Python Error:

Traceback (most recent call last):
  File "/root/tanzine-bot/tokens.py", line 421, in Parse
    x = exec(statment)
  File "<string>", line 1
    self.vars['final'] = self.vars["hash"].hexdigest(()
                                                      ^
SyntaxError: unexpected EOF while parsing

During handling of the above exception, another exception occurred:

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 424, in Parse
    if self.returned:
AttributeError: 'Parser' object has no attribute 'returned'