-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add checkEOL() to every command #19
Comments
Added a version of checkEOL that takes no arguments Same as existing checkEOL(false) Changed all checkEOL(false) calls to checkEOL()
I've added a second |
Round 2: the intent was just to remove One last-minute trivial change that affected dozens and dozens of lines I did not test: everywhere This is a big, messy change, and I don't think there's anything critical in there, so I plan to hold off pushing this to RFO-BASIC until after v01.71 is out, Besides, that'll give me time to deal with the merge. |
Round 2 is checked in. |
Issue #41 gave me a close look at executeIF and its ilk. There was one checkEOL() missing (extra characters after IF with no THEN). That case still got a syntax error; all that was missing was the standard runtime error message. But I wrapped in another change, as the commit comment says. A while back we got a big performance improvement by changing a lot of Integer objects to int primitives. This go-round I changed constants pushed onto the IfElseStack from int to Integer. The idea was to save a lot of boxing and unboxing, making all the conditions just Object reference compares. It didn't actually help any -- the benchmark results before and after are indistinguishable. Oh well, live and learn. It did have one side-effect: switch cases can't be Objects, so the switch at the top of StatementExecuter is now an if-else tree. Other minor changes:
Testing: breakpoints showed f04_if_else.bas covers all the positive paths. I just needed to inject manual syntax errors to confirm the one added checkEOL works and all other syntax errors are still reported. |
Covered most BT commands with fix for Issue 47 on 2012/12/12. |
Most commands do not check to insure that there is no extraneous (non comment) characters after syntax processing on a command is done. This lack of checking can make debugging some types of coding errors difficult.
If you see a command that does not have a checkEOL(), put it in.....and TEST that change.
The text was updated successfully, but these errors were encountered: