| 390 | } |
| 391 | |
| 392 | txScript* fxParseScript(txMachine* the, void* stream, txGetter getter, txUnsigned flags) |
| 393 | { |
| 394 | txParser _parser; |
| 395 | txParser* parser = &_parser; |
| 396 | txParserJump jump; |
| 397 | txScript* script = NULL; |
| 398 | fxInitializeParser(parser, the, the->parserBufferSize, the->parserTableModulo); |
| 399 | parser->firstJump = &jump; |
| 400 | if (c_setjmp(jump.jmp_buf) == 0) { |
| 401 | #if defined(mxDebug) && !MODDEF_XS_TEST |
| 402 | if (fxIsConnected(the)) { |
| 403 | char tag[16]; |
| 404 | flags |= mxDebugFlag; |
| 405 | fxGenerateTag(the, tag, sizeof(tag), C_NULL); |
| 406 | fxFileEvalString(the, ((txStringStream*)stream)->slot->value.string, tag); |
| 407 | parser->path = fxNewParserSymbol(parser, tag); |
| 408 | } |
| 409 | #endif |
| 410 | fxParserTree(parser, stream, getter, flags, NULL); |
| 411 | fxParserHoist(parser); |
| 412 | fxParserBind(parser); |
| 413 | script = fxParserCode(parser); |
| 414 | } |
| 415 | #ifdef mxInstrument |
| 416 | if (the->peakParserSize < parser->total) |
| 417 | the->peakParserSize = parser->total; |
| 418 | #endif |
| 419 | fxTerminateParser(parser); |
| 420 | return script; |
| 421 | } |
| 422 | |
| 423 | #if MODDEF_XS_MODS |
| 424 |
nothing calls this directly
no test coverage detected