| 2843 | } |
| 2844 | |
| 2845 | void fxDeclareNodeCodeAssign(void* it, void* param, txFlag flag) |
| 2846 | { |
| 2847 | txDeclareNode* self = it; |
| 2848 | txDeclareNode* declaration = self->declaration; |
| 2849 | if (!declaration) |
| 2850 | fxCoderAddSymbol(param, -1, XS_CODE_SET_VARIABLE, self->symbol); |
| 2851 | else { |
| 2852 | if (self->description->token == XS_TOKEN_CONST) |
| 2853 | fxCoderAddIndex(param, 0, (declaration->flags & mxDeclareNodeClosureFlag) ? XS_CODE_CONST_CLOSURE_1: XS_CODE_CONST_LOCAL_1, declaration->index); |
| 2854 | else if (self->description->token == XS_TOKEN_LET) |
| 2855 | fxCoderAddIndex(param, 0, (declaration->flags & mxDeclareNodeClosureFlag) ? XS_CODE_LET_CLOSURE_1: XS_CODE_LET_LOCAL_1, declaration->index); |
| 2856 | else if (self->description->token == XS_TOKEN_USING) { |
| 2857 | fxCoderAddIndex(param, 0, (declaration->flags & mxDeclareNodeClosureFlag) ? XS_CODE_CONST_CLOSURE_1: XS_CODE_CONST_LOCAL_1, declaration->index); |
| 2858 | if (self->flags & mxAwaitingFlag) |
| 2859 | fxCoderAddByte(param, 0, XS_CODE_USING_ASYNC); |
| 2860 | else |
| 2861 | fxCoderAddByte(param, 0, XS_CODE_USING); |
| 2862 | fxCoderAddIndex(param, 0, XS_CODE_SET_LOCAL_1, declaration->nextDeclareNode->index); |
| 2863 | } |
| 2864 | else |
| 2865 | fxCoderAddIndex(param, 0, (declaration->flags & mxDeclareNodeClosureFlag) ? XS_CODE_VAR_CLOSURE_1 : XS_CODE_VAR_LOCAL_1, declaration->index); |
| 2866 | } |
| 2867 | } |
| 2868 | |
| 2869 | void fxDeclareNodeCodeReference(void* it, void* param, txFlag flag) |
| 2870 | { |
no test coverage detected