-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support for conditionals like "else if" and "else" #60
Comments
hum ok |
Is anybody working on this? otherwise I would to like to work on this. |
It's not taken by anyone yet. You're free to work on it! |
Thanks |
I just had a little question about the file gbsymbols/symbols.py. I get that in this file you defined all the keywords and the symbols for the language( in a key-value pair ), but why do so in a class? couldn't the same thing be done with a dictionary? Just wanted to know if there any specific reasons on why the former is more efficient/preferred than the later. Thanks |
@anirudnits dot notation better |
Does nested if-elif-else conditionals make sense for greenBerry? I am asking because its a one-sentence language and if nested conditionals are allowed then it may become messy. |
@anirudnits try a without nesting |
@Abdur-rahmaanJ I am sort of done with integrating elif and else statements. I have implemented the following in this way: Notice that I intentionally left out the colon for the else statement. I just thought that would be more intuitive. Any thoughts? |
@anirudnits works fine! |
I tried the following in the IDE :
if 2 = 2 : print yes
else print no
And the output was :
yes
no
I think there should be an error message displayed for the use of "else".
Currently the code supports only "if" but not "else if" or "else". I think we should add these functionalities as well.
The text was updated successfully, but these errors were encountered: