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

add new foreach for maps/mapiterators and many other iterators (actor/thinker/blockthings/blocklines) #2217

Merged
merged 5 commits into from
Nov 21, 2023

Conversation

RicardoLuis0
Copy link
Collaborator

@RicardoLuis0 RicardoLuis0 commented Oct 15, 2023

Usage:

foreach([key,] value : map/mapiterator)
{
    //...
}

foreach(actor_var|line_var [, position [, portalflags]] : blocklinesiterator/blockthingsiterator)
{
    //...
}

foreach([Type] var : actoriterator/thinkeriterator)
{
    //...
}

IteratorsForEachTest.zip

@RicardoLuis0 RicardoLuis0 marked this pull request as ready for review November 8, 2023 12:49
@RicardoLuis0
Copy link
Collaborator Author

RicardoLuis0 commented Nov 8, 2023

will need some stub functions to compile on raze:

bool IsGameSpecificForEachLoop(FxForEachLoop * loop) { return false; }

FxExpression * ResolveGameSpecificForEachLoop(FxForEachLoop * loop) { return nullptr; }



bool HasGameSpecificTwoArgForEachLoopTypeNames() { return false; }

const char * GetGameSpecificTwoArgForEachLoopTypeNames() { return ""; }

bool IsGameSpecificTwoArgForEachLoop(FxTwoArgForEachLoop * loop) { return nullptr; }

FxExpression * ResolveGameSpecificTwoArgForEachLoop(FxTwoArgForEachLoop * loop) { return false; }



bool HasGameSpecificThreeArgForEachLoopTypeNames() { return false; }

const char * GetGameSpecificThreeArgForEachLoopTypeNames() { return ""; }

bool IsGameSpecificThreeArgForEachLoop(FxThreeArgForEachLoop * loop) { return false; }

FxExpression * ResolveGameSpecificThreeArgForEachLoop(FxThreeArgForEachLoop * loop) { return nullptr; }



bool HasGameSpecificTypedForEachLoopTypeNames() { return false; }

const char * GetGameSpecificTypedForEachLoopTypeNames() { return ""; }

bool IsGameSpecificTypedForEachLoop(FxTypedForEachLoop * loop) { return false; }

FxExpression * ResolveGameSpecificTypedForEachLoop(FxTypedForEachLoop * loop) { return nullptr; }

@madame-rachelle madame-rachelle merged commit 4ec76af into ZDoom:master Nov 21, 2023
10 checks passed
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.

2 participants