Skip to content

Feature/ifinline#118

Merged
boriel merged 15 commits intomasterfrom
feature/ifinline
Nov 22, 2017
Merged

Feature/ifinline#118
boriel merged 15 commits intomasterfrom
feature/ifinline

Conversation

@boriel
Copy link
Copy Markdown
Collaborator

@boriel boriel commented Nov 22, 2017

This is a BIG change.
After so long, finally ZX Basic allows IF THEN with no trailing END IF.

make symbol NOP iterable

Approved-by: Jose Rodriguez <boriel@gmail.com>
This also allows omitting END IF in one-line ifs
* Remove TODO from api/optimize.py
* Add code regions for FOR and IF sentences
* Put <step> definition within FOR region
IF a block in the THEN part is accessed also from a GOTO
statement (yes, dirty programming but possible), this block
cannot be removed.
IF a block in the ELSE part is accessed also from a GOTO
statement (yes, dirty programming but possible), this block
cannot be removed.
Now the optimizer centralizes al IF optimization.
Also allows now empty ELSE after ELSEIF
While optimization must not remove empty WHILE statements
if the condition is always true. The infinite loop might
be intended by the user.

Also, when removing a WHILE sentence (always false), it
must be checked the body is not accessed with a GOTO or the like.
@boriel boriel merged commit 301b93e into master Nov 22, 2017
@boriel boriel deleted the feature/ifinline branch November 22, 2017 23:25
boriel added a commit that referenced this pull request Apr 3, 2019
Added badges to README.md file

Approved-by: Jose Rodriguez <boriel@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant