Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Erroneous execution of statements even though there is a syntax error. #66

Open
anirudnits opened this issue Aug 19, 2019 · 5 comments
Open
Labels

Comments

@anirudnits
Copy link

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?

@Abdur-rahmaanJ
Copy link
Owner

@anirudnits a bug

@Abdur-rahmaanJ
Copy link
Owner

Code does not include thorough testing

@anirudnits
Copy link
Author

anirudnits commented Aug 19, 2019

@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.

@anirudnits
Copy link
Author

@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

@anirudnits
Copy link
Author

@Abdur-rahmaanJ you there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants