-
Notifications
You must be signed in to change notification settings - Fork 228
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
ELSE operator #6
Comments
I'd second this. I've had to write weird code at times because of the lack of an else. |
We have two operators here ELSE and ELSE IF. Which is more important to you so we can prioritize? |
I think only ELSE. With proper implementation ELSE IF is obtained automatically. In terms of kRISC.tpg:
|
That's right, but the ELSE part in the grammar should be optional, like this:
|
I've implemented the ELSE in my own local copy, but I don't understand how to push two different separate pull requests to github that are both pending at the same time. It keeps trying to merge my changes for this issue with my previous pull request for a different issue. Do I need to make a branch to keep that from happening? All my past experience has been with SVN and CVS so I don't quite 'get' Github yet. At any rate, if I can figure out how to get my code into a second pull request, I have this solved so that the following test script works correctly:
I have to say, @marianoapp, the kRISC code is nice and easy to understand (provided you know a few basic things about what assembly language programs typically look like) and I'm impressed with the internals now that I've dived into them a bit to make this work. The ELSE implementation worked right on the first attempt without headaches, just from basic guesswork on my part about how to implement it, looking at how the else-less if worked already. |
Thanks, I appreciate it. |
Fixed a bug when a script calls another with args.
The else statement extremely necessary.
Example syntax:
The text was updated successfully, but these errors were encountered: