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

Function fxDeclareNodeCode

xs/sources/xsCode.c:2829–2843  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2827}
2828
2829void fxDeclareNodeCode(void* it, void* param)
2830{
2831 txDeclareNode* self = it;
2832 txCoder* coder = param;
2833 if (self->description->token == XS_TOKEN_CONST)
2834 fxReportParserError(coder->parser, self->line, "invalid const");
2835 else if (self->description->token == XS_TOKEN_LET) {
2836 fxNodeDispatchCodeReference(self, param, 0);
2837 fxCoderAddByte(coder, 1, XS_CODE_UNDEFINED);
2838 fxNodeDispatchCodeAssign(self, param, 0);
2839 fxCoderAddByte(coder, -1, XS_CODE_POP);
2840 }
2841 else if (self->description->token == XS_TOKEN_USING)
2842 fxReportParserError(coder->parser, self->line, "invalid using");
2843}
2844
2845void fxDeclareNodeCodeAssign(void* it, void* param, txFlag flag)
2846{

Callers

nothing calls this directly

Calls 4

fxReportParserErrorFunction · 0.85
fxCoderAddByteFunction · 0.85
fxNodeDispatchCodeAssignFunction · 0.85

Tested by

no test coverage detected