MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxBreakContinueNodeCode

Function fxBreakContinueNodeCode

xs/sources/xsCode.c:2544–2566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2542}
2543
2544void fxBreakContinueNodeCode(void* it, void* param)
2545{
2546 txBreakContinueNode* self = it;
2547 txCoder* coder = param;
2548 txTargetCode* target = (self->description->token == XS_TOKEN_BREAK) ? coder->firstBreakTarget : coder->firstContinueTarget;
2549 while (target) {
2550 txLabelNode* label = target->label;
2551 while (label) {
2552 if (label->symbol == self->symbol) {
2553 fxCoderAdjustEnvironment(coder, target);
2554 fxCoderAdjustScope(coder, target);
2555 fxCoderAddBranch(param, 0, XS_CODE_BRANCH_1, target);
2556 return;
2557 }
2558 label = label->nextLabel;
2559 }
2560 target = target->nextTarget;
2561 }
2562 if (self->description->token == XS_TOKEN_BREAK)
2563 fxReportParserError(coder->parser, self->line, "invalid break");
2564 else
2565 fxReportParserError(coder->parser, self->line, "invalid continue");
2566}
2567
2568void fxCallNodeCode(void* it, void* param)
2569{

Callers

nothing calls this directly

Calls 4

fxCoderAdjustEnvironmentFunction · 0.85
fxCoderAdjustScopeFunction · 0.85
fxCoderAddBranchFunction · 0.85
fxReportParserErrorFunction · 0.85

Tested by

no test coverage detected