| 462 | } |
| 463 | |
| 464 | void fxClassNodeHoist(void* it, void* param) |
| 465 | { |
| 466 | txClassNode* self = it; |
| 467 | txHoister* hoister = param; |
| 468 | txClassNode* former = hoister->classNode; |
| 469 | txNode* item = self->items->first; |
| 470 | if (self->symbol) { |
| 471 | txDeclareNode* node = fxDeclareNodeNew(hoister->parser, XS_TOKEN_CONST, self->symbol); |
| 472 | node->flags |= mxDeclareNodeClosureFlag; |
| 473 | self->symbolScope = fxScopeNew(hoister, it, XS_TOKEN_BLOCK); |
| 474 | fxScopeAddDeclareNode(self->symbolScope, node); |
| 475 | } |
| 476 | if (self->heritage) |
| 477 | fxNodeDispatchHoist(self->heritage, param); |
| 478 | self->scope = fxScopeNew(hoister, it, XS_TOKEN_BLOCK); |
| 479 | while (item) { |
| 480 | if (item->description->token == XS_TOKEN_PROPERTY) { |
| 481 | } |
| 482 | else if (item->description->token == XS_TOKEN_PROPERTY_AT) { |
| 483 | if (item->flags & (mxMethodFlag | mxGetterFlag | mxSetterFlag)) { |
| 484 | } |
| 485 | else { |
| 486 | txSymbol* symbol = fxNewParserChunkClear(hoister->parser, sizeof(txSymbol)); |
| 487 | txDeclareNode* node = fxDeclareNodeNew(hoister->parser, XS_TOKEN_CONST, symbol); |
| 488 | symbol->ID = -1; |
| 489 | node->flags |= mxDeclareNodeClosureFlag; |
| 490 | fxScopeAddDeclareNode(self->scope, node); |
| 491 | ((txPropertyAtNode*)item)->atAccess = fxAccessNodeNew(hoister->parser, XS_TOKEN_ACCESS, symbol); |
| 492 | } |
| 493 | } |
| 494 | else { |
| 495 | txSymbol* symbol = ((txPrivatePropertyNode*)item)->symbol; |
| 496 | txDeclareNode* node = fxScopeGetDeclareNode(self->scope, symbol); |
| 497 | if (node) { |
| 498 | txUnsigned flags = (node->flags & (mxStaticFlag | mxGetterFlag | mxSetterFlag)) ^ (item->flags & (mxStaticFlag | mxGetterFlag | mxSetterFlag)); |
| 499 | if ((flags != (mxGetterFlag | mxSetterFlag))) |
| 500 | fxReportParserError(hoister->parser, item->line, "duplicate %s", symbol->string); |
| 501 | } |
| 502 | node = fxDeclareNodeNew(hoister->parser, XS_TOKEN_CONST, symbol); |
| 503 | node->flags |= mxDeclareNodeClosureFlag | (item->flags & (mxStaticFlag | mxGetterFlag | mxSetterFlag)); |
| 504 | fxScopeAddDeclareNode(self->scope, node); |
| 505 | ((txPrivatePropertyNode*)item)->symbolAccess = fxAccessNodeNew(hoister->parser, XS_TOKEN_ACCESS, symbol); |
| 506 | if (item->flags & (mxMethodFlag | mxGetterFlag | mxSetterFlag)) { |
| 507 | txSymbol* symbol = fxNewParserChunkClear(hoister->parser, sizeof(txSymbol)); |
| 508 | txDeclareNode* node = fxDeclareNodeNew(hoister->parser, XS_TOKEN_CONST, symbol); |
| 509 | symbol->ID = -1; |
| 510 | node->flags |= mxDeclareNodeClosureFlag; |
| 511 | fxScopeAddDeclareNode(self->scope, node); |
| 512 | ((txPrivatePropertyNode*)item)->valueAccess = fxAccessNodeNew(hoister->parser, XS_TOKEN_ACCESS, symbol); |
| 513 | } |
| 514 | } |
| 515 | item = item->next; |
| 516 | } |
| 517 | if (self->instanceInit) { |
| 518 | txSymbol* symbol = fxNewParserChunkClear(hoister->parser, sizeof(txSymbol)); |
| 519 | txDeclareNode* node = fxDeclareNodeNew(hoister->parser, XS_TOKEN_CONST, symbol); |
| 520 | symbol->ID = -1; |
| 521 | node->flags |= mxDeclareNodeClosureFlag; |
nothing calls this directly
no test coverage detected