N_NIMCALL(void, patternerror_269051)(Tnode191813* n) {
	NimStringDesc* LOC1;
	nimfr("patternError", "parampatterns.nim")
	nimln(45, "parampatterns.nim");
	LOC1 = 0;
	LOC1 = rendertree_213058(n, 4);
	localerror_165155((*n).info, ((NU16) 1), LOC1);
	popFrame();
}
N_NIMCALL(void, patternerror_268051)(Tnode191813* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_213058(n, 4);
	localerror_165171((*n).info, ((NU16) 1), LOC1);
}
Beispiel #3
0
N_NIMCALL(void, invalidpragma_217047)(Tnode191813* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_213058(n, 4);
	localerror_165171((*n).info, ((NU16) 163), LOC1);
}
Beispiel #4
0
N_NIMCALL(Tnode191813*, evaltemplate_383260)(Tnode191813* n, Tsym191843* tmpl, Tsym191843* gensymowner) {
	Tnode191813* result;
	Tnode191813* args;
	Templctx383019 ctx;
	Tnode191813* body;
	result = 0;
	evaltemplatecounter_383256 += ((NI) 1);
	{
		if (!(((NI) 100) < evaltemplatecounter_383256)) goto LA3;
		globalerror_165150((*n).info, ((NU16) 183), ((NimStringDesc*) &TMP2820));
		result = n;
	}
	LA3: ;
	args = evaltemplateargs_383184(n, tmpl);
	memset((void*)(&ctx), 0, sizeof(ctx));
	ctx.owner = tmpl;
	ctx.gensymowner = gensymowner;
	initidtable_195057((&ctx.mapping));
	body = getbody_235647(tmpl);
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = isatom_196906(body);
		if (!LOC7) goto LA8;
		result = newnodei_193351(((NU8) 37), (*body).info);
		evaltemplateaux_383039(body, args, (&ctx), result);
		{
			NI LOC12;
			LOC12 = 0;
			LOC12 = len_192097(result);
			if (!(LOC12 == ((NI) 1))) goto LA13;
			result = (*result).kindU.S6.sons->data[((NI) 0)];
		}
		goto LA10;
		LA13: ;
		{
			NimStringDesc* LOC16;
			LOC16 = 0;
			LOC16 = rendertree_213058(result, 4);
			localerror_165171((*result).info, ((NU16) 1), LOC16);
		}
		LA10: ;
	}
	goto LA5;
	LA8: ;
	{
		result = copynode_195644(body);
		ctx.instlines = !(((*body).kind == ((NU8) 115) || (*body).kind == ((NU8) 126) || (*body).kind == ((NU8) 112) || (*body).kind == ((NU8) 127)));
		{
			if (!ctx.instlines) goto LA20;
			(*result).info = (*n).info;
		}
		LA20: ;
		{
			NI i_383308;
			NI HEX3Atmp_383322;
			NI LOC23;
			NI res_383325;
			i_383308 = 0;
			HEX3Atmp_383322 = 0;
			LOC23 = 0;
			LOC23 = safelen_192125(body);
			HEX3Atmp_383322 = (NI)(LOC23 - ((NI) 1));
			res_383325 = ((NI) 0);
			{
				while (1) {
					if (!(res_383325 <= HEX3Atmp_383322)) goto LA25;
					i_383308 = res_383325;
					evaltemplateaux_383039((*body).kindU.S6.sons->data[i_383308], args, (&ctx), result);
					res_383325 += ((NI) 1);
				} LA25: ;
			}
		}
	}
	LA5: ;
	evaltemplatecounter_383256 -= ((NI) 1);
	return result;
}
Beispiel #5
0
N_NIMCALL(NimStringDesc*, getmodulename_251018)(Tnode191813* n) {
	NimStringDesc* result;
{	result = 0;
	switch ((*n).kind) {
	case ((NU8) 20):
	case ((NU8) 21):
	case ((NU8) 22):
	{
		result = nosunixToNativePath((*n).kindU.S3.strval, ((NimStringDesc*) &TMP3460));
	}
	break;
	case ((NU8) 2):
	{
		result = copyString((*(*n).kindU.S5.ident).s);
	}
	break;
	case ((NU8) 3):
	{
		result = copyString((*(*(*n).kindU.S4.sym).name).s);
	}
	break;
	case ((NU8) 29):
	case ((NU8) 30):
	{
		NimStringDesc* LOC12;
		{
			NIM_BOOL LOC7;
			Tident167021* LOC9;
			LOC7 = 0;
			LOC7 = ((*(*n).kindU.S6.sons->data[((NI) 0)]).kind == ((NU8) 2));
			if (!(LOC7)) goto LA8;
			LOC9 = 0;
			LOC9 = getident_167463(((NimStringDesc*) &TMP3461));
			LOC7 = ((*(*(*n).kindU.S6.sons->data[((NI) 0)]).kindU.S5.ident).Sup.id == (*LOC9).Sup.id);
			LA8: ;
			if (!LOC7) goto LA10;
			(*n).kind = ((NU8) 78);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.sons->data[((NI) 0)]), (*n).kindU.S6.sons->data[((NI) 1)]);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.sons->data[((NI) 1)]), (*n).kindU.S6.sons->data[((NI) 2)]);
			(*n).kindU.S6.sons = (Tnodeseq191807*) setLengthSeq(&((*n).kindU.S6.sons)->Sup, sizeof(Tnode191813*), ((NI) 2));
			result = getmodulename_251018((*n).kindU.S6.sons->data[((NI) 0)]);
			goto BeforeRet;
		}
		LA10: ;
		LOC12 = 0;
		LOC12 = rendertree_213058(n, 4);
		result = nsuReplaceStr(LOC12, ((NimStringDesc*) &TMP3462), ((NimStringDesc*) &TMP3460));
	}
	break;
	case ((NU8) 45):
	{
		NimStringDesc* LOC14;
		LOC14 = 0;
		LOC14 = rendertree_213058(n, 4);
		result = nsuReplaceStr(LOC14, ((NimStringDesc*) &TMP3463), ((NimStringDesc*) &TMP3464));
	}
	break;
	case ((NU8) 78):
	{
		result = getmodulename_251018((*n).kindU.S6.sons->data[((NI) 0)]);
	}
	break;
	default:
	{
		NimStringDesc* LOC17;
		NimStringDesc* LOC18;
		LOC17 = 0;
		LOC17 = rendertree_213058(n, 0);
		LOC18 = 0;
		LOC18 = nsuFormatSingleElem(((NimStringDesc*) &TMP3465), LOC17);
		localerror_165171((*n).info, ((NU16) 4), LOC18);
		result = copyString(((NimStringDesc*) &TMP3460));
	}
	break;
	}
	}BeforeRet: ;
	return result;
}