Erroneous execution of statements even though there is a syntax error.
anirudnits opened this issue · 5 comments
Like if I write
func vector print string vector is fun
( intentionally leaving out the colon after function declaration )
I get the output as
dear berry you ill defined a function on line 1
vector is fun
that is even though my syntax was wrong print command gets executed. Another example
if print hello
will give this as output
dear berry you made a mistake on an if statement on line 1
hello
Is this by design or is this an unintended error?
@anirudnits a bug
Code does not include thorough testing
@Abdur-rahmaanJ I went through the code and I think I have a solution.
In the function greenBerry_eval in greenBerry/greenBerry.py, adding return
statements whenever there is an exception should do the trick.
@Abdur-rahmaanJ I tried adding the return statement with the Exception Handling and it seems it will take care of the above mentioned issue. However if I do that, then I will have to go and change the gb_main.py file as well which reads the file main.gb, modifying it to such that it splits the instructions line-wise and then execute each line with the function greenBerry_eval in greenBerry.py
@Abdur-rahmaanJ you there?