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

Function fxParseScript

xs/platforms/qca4020/xsHost.c:680–700  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680txScript* fxParseScript(txMachine* the, void* stream, txGetter getter, txUnsigned flags)
681{
682 txParser _parser;
683 txParser* parser = &_parser;
684 txParserJump jump;
685 txScript* script = NULL;
686 fxInitializeParser(parser, the, the->parserBufferSize, the->parserTableModulo);
687 parser->firstJump = &jump;
688 if (c_setjmp(jump.jmp_buf) == 0) {
689 fxParserTree(parser, stream, getter, flags, NULL);
690 fxParserHoist(parser);
691 fxParserBind(parser);
692 script = fxParserCode(parser);
693 }
694#ifdef mxInstrument
695 if (the->peakParserSize < parser->total)
696 the->peakParserSize = parser->total;
697#endif
698 fxTerminateParser(parser);
699 return script;
700}
701
702/*
703 Instrumentation

Callers

nothing calls this directly

Calls 6

fxInitializeParserFunction · 0.85
fxParserTreeFunction · 0.85
fxParserHoistFunction · 0.85
fxParserBindFunction · 0.85
fxParserCodeFunction · 0.85
fxTerminateParserFunction · 0.85

Tested by

no test coverage detected