Beispiel #1
0
N_NIMCALL(void, ropeseqinsert_148403)(tropeseq148009** rs, trope148007* r, NI at) {
	NI length;
	NI i_148467;
	NI HEX3Atmp_148468;
	NI TMP548;
	NI res_148470;
	nimfr("ropeSeqInsert", "ropes.nim")
	nimln(163, "ropes.nim");
	nimln(163, "ropes.nim");
	length = (*rs)->Sup.len;
	nimln(164, "ropes.nim");
	{
		NI TMP546;
		nimln(164, "ropes.nim");
		if (!(length < ((NI) (at)))) goto LA3;
		nimln(165, "ropes.nim");
		nimln(165, "ropes.nim");
		TMP546 = addInt(((NI) (at)), 1);
		(*rs) = (tropeseq148009*) setLengthSeq(&((*rs))->Sup, sizeof(trope148007*), ((NI)chckRange((NI32)(TMP546), (-2147483647 -1), 2147483647)));
	}
	goto LA1;
	LA3: ;
	{
		NI TMP547;
		nimln(167, "ropes.nim");
		nimln(167, "ropes.nim");
		TMP547 = addInt(length, 1);
		(*rs) = (tropeseq148009*) setLengthSeq(&((*rs))->Sup, sizeof(trope148007*), (NI32)(TMP547));
	}
	LA1: ;
	i_148467 = 0;
	HEX3Atmp_148468 = 0;
	nimln(168, "ropes.nim");
	nimln(168, "ropes.nim");
	TMP548 = addInt(((NI) (at)), 1);
	HEX3Atmp_148468 = ((NI)chckRange((NI32)(TMP548), (-2147483647 -1), 2147483647));
	nimln(1442, "system.nim");
	res_148470 = length;
	nimln(1443, "system.nim");
	while (1) {
		NI TMP549;
		nimln(1443, "system.nim");
		if (!(HEX3Atmp_148468 <= res_148470)) goto LA6;
		nimln(1442, "system.nim");
		i_148467 = res_148470;
		nimln(169, "ropes.nim");
		if ((NU)(i_148467) >= (NU)((*rs)->Sup.len)) raiseIndexError();
		nimln(169, "ropes.nim");
		TMP549 = subInt(i_148467, 1);
		if ((NU)((NI32)(TMP549)) >= (NU)((*rs)->Sup.len)) raiseIndexError();
		asgnRefNoCycle((void**) &(*rs)->data[i_148467], (*rs)->data[(NI32)(TMP549)]);
		nimln(1445, "system.nim");
		res_148470 = subInt(res_148470, 1);
	} LA6: ;
	nimln(170, "ropes.nim");
	if ((NU)(at) >= (NU)((*rs)->Sup.len)) raiseIndexError();
	asgnRefNoCycle((void**) &(*rs)->data[at], r);
	popFrame();
}
Beispiel #2
0
N_NIMCALL(void, Doend_80150)(TY77267* L_80153, TY77263* Tok_80154) {
if (!((Condstack_80133->Sup.len-1) < 0)) goto LA2;
Lexmessage_77326(&(*L_80153), ((NU8) 21), ((NimStringDesc*) &TMP195712));
LA2: ;
Ppgettok_80010(L_80153, Tok_80154);
Condstack_80133 = (TY80132*) setLengthSeq(&(Condstack_80133)->Sup, sizeof(NIM_BOOL), (Condstack_80133->Sup.len-1));
}
Beispiel #3
0
N_NIMCALL(void, Openscope_60141)(TY60099* Tab_60144) {
if (!((*Tab_60144).Stack->Sup.len <= ((NI) ((*Tab_60144).Tos)))) goto LA2;
(*Tab_60144).Stack = (TY60101*) setLengthSeq(&((*Tab_60144).Stack)->Sup, sizeof(TY55530), (NI32)(((NI) ((*Tab_60144).Tos)) + 1));
LA2: ;
Initstrtable_55747(&(*Tab_60144).Stack->data[(*Tab_60144).Tos]);
(*Tab_60144).Tos += 1;
}
Beispiel #4
0
N_NIMCALL(void, prunesocketset_512846)(TY517225** s, fd_set* fd) {
	NI i;
	NI L;
	i = ((NI) 0);
	L = ((*s) ? (*s)->Sup.len : 0);
	{
		while (1) {
			if (!(i < L)) goto LA2;
			{
				int LOC5;
				LOC5 = 0;
				LOC5 = FD_ISSET((*s)->data[i], fd);
				if (!(LOC5 == ((NI32) 0))) goto LA6;
				(*s)->data[i] = (*s)->data[(NI)(L - ((NI) 1))];
				L -= ((NI) 1);
			}
			goto LA3;
			LA6: ;
			{
				i += ((NI) 1);
			}
			LA3: ;
		} LA2: ;
	}
	(*s) = (TY517225*) setLengthSeq(&((*s))->Sup, sizeof(int), ((NI) (L)));
}
Beispiel #5
0
N_NIMCALL(void, clear_145256)(Stringtableobj144212* s, NU8 mode) {
    (*s).mode = mode;
    (*s).counter = ((NI) 0);
    (*s).data = (Keyvaluepairseq144210*) setLengthSeq(&((*s).data)->Sup, sizeof(TY145352), ((NI) 64));
    {
        NI i_145296;
        NI HEX3Atmp_145298;
        NI res_145301;
        i_145296 = 0;
        HEX3Atmp_145298 = 0;
        HEX3Atmp_145298 = (((*s).data ? (*s).data->Sup.len : 0) - 1);
        res_145301 = ((NI) 0);
        {
            while (1) {
                if (!(res_145301 <= HEX3Atmp_145298)) goto LA3;
                i_145296 = res_145301;
                {
                    NimStringDesc* LOC8;
                    if (!!((*s).data->data[i_145296].Field0 == 0)) goto LA6;
                    LOC8 = 0;
                    LOC8 = (*s).data->data[i_145296].Field0;
                    (*s).data->data[i_145296].Field0 = copyStringRC1(NIM_NIL);
                    if (LOC8) nimGCunrefNoCycle(LOC8);
                }
LA6:
                ;
                res_145301 += ((NI) 1);
            }
LA3:
            ;
        }
    }
}
Beispiel #6
0
N_NIMCALL(void, Addimplicitmod_41142)(NimStringDesc* Filename_41144) {
    NI Length_41174;
    Length_41174 = 0;
    Length_41174 = Gimplicitmods_41131->Sup.len;
    Gimplicitmods_41131 = (TY34021*) setLengthSeq(&(Gimplicitmods_41131)->Sup, sizeof(NimStringDesc*), (NI64)(Length_41174 + 1));
    asgnRefNoCycle((void**) &Gimplicitmods_41131->data[Length_41174], copyString(Filename_41144));
}
Beispiel #7
0
N_NIMCALL(void, Registermodule_191229)(NimStringDesc* Filename_191231, TY55548* Module_191232) {
NI Length_191243;
Length_191243 = 0;
Length_191243 = Compmods_191227->Sup.len;
Compmods_191227 = (TY191208*) setLengthSeq(&(Compmods_191227)->Sup, sizeof(TY191206), (NI64)(Length_191243 + 1));
asgnRefNoCycle((void**) &Compmods_191227->data[Length_191243].Filename, copyString(Filename_191231));
asgnRef((void**) &Compmods_191227->data[Length_191243].Module, Module_191232);
}
Beispiel #8
0
static N_INLINE(Ropeobj172006*, pop_172530)(TY184350** s) {
	Ropeobj172006* result;
	NI L;
	result = 0;
	L = (NI)(((*s) ? (*s)->Sup.len : 0) - ((NI) 1));
	result = (*s)->data[L];
	(*s) = (TY184350*) setLengthSeq(&((*s))->Sup, sizeof(Ropeobj172006*), ((NI) (L)));
	return result;
}
Beispiel #9
0
static N_INLINE(Ropeobj161009*, pop_161597)(TY163351** s) {
	Ropeobj161009* result;
	NI L;
	result = 0;
	L = (NI)(((*s) ? (*s)->Sup.len : 0) - ((NI) 1));
	result = (*s)->data[L];
	(*s) = (TY163351*) setLengthSeq(&((*s))->Sup, sizeof(Ropeobj161009*), ((NI) (L)));
	return result;
}
Beispiel #10
0
static N_INLINE(NI, pop_136507)(TY136010** s_136515) {
	NI result;
	NI l;
	result = 0;
	l = (NI64)((*s_136515)->Sup.len - 1);
	result = (*s_136515)->data[l];
	(*s_136515) = (TY136010*) setLengthSeq(&((*s_136515))->Sup, sizeof(NI), l);
	return result;
}
static N_INLINE(Tnode292802*, pop_318246_1689653243)(Tnodeseq292796** s0) {
	Tnode292802* result0;
	NI L0;
	result0 = (Tnode292802*)0;
	L0 = (NI)(((*s0) ? (*s0)->Sup.len : 0) - ((NI) 1));
	result0 = (*s0)->data[L0];
	(*s0) = (Tnodeseq292796*) setLengthSeq(&((*s0))->Sup, sizeof(Tnode292802*), ((NI) (L0)));
	return result0;
}
Beispiel #12
0
N_NIMCALL(void, doend_185193)(Tlexer180185* L, Ttoken180181* tok) {
	{
		if (!((condstack_185188 ? (condstack_185188->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_180483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP1880));
	}
	LA3: ;
	ppgettok_185009(L, tok);
	condstack_185188 = (TY185169*) setLengthSeq(&(condstack_185188)->Sup, sizeof(NIM_BOOL), ((NI) ((condstack_185188 ? (condstack_185188->Sup.len-1) : -1))));
}
Beispiel #13
0
N_NIMCALL(void, doend_210131)(Tlexer205173* L, Ttoken205169* tok) {
	{
		if (!((condstack_210129 ? (condstack_210129->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_205370((&(*L)), ((NU16) 24), ((NimStringDesc*) &TMP2038));
	}
	LA3: ;
	ppgettok_210003(L, tok);
	condstack_210129 = (TY210112*) setLengthSeq(&(condstack_210129)->Sup, sizeof(NIM_BOOL), ((NI) ((condstack_210129 ? (condstack_210129->Sup.len-1) : -1))));
}
Beispiel #14
0
N_NIMCALL(void, Popowner_107097)(void) {
NI Length_107153;
Length_107153 = 0;
Length_107153 = Gowners_107116->Sup.len;
if (!(Length_107153 <= 0)) goto LA2;
Internalerror_48163(((NimStringDesc*) &TMP196128));
LA2: ;
Gowners_107116 = (TY55528*) setLengthSeq(&(Gowners_107116)->Sup, sizeof(TY55548*), (NI32)(Length_107153 - 1));
}
Beispiel #15
0
static N_INLINE(Tnode_bROa11lyF5vxEN9aYNbHmhw*, pop_d29cpXTitwhGntYusVkzaCgtrees)(TY_ehmV9bTklH2Gt9cXHV9c0HLeQ** s0) {
	Tnode_bROa11lyF5vxEN9aYNbHmhw* result0;
	NI L0;
	result0 = (Tnode_bROa11lyF5vxEN9aYNbHmhw*)0;
	L0 = (NI)(((*s0) ? (*s0)->Sup.len : 0) - ((NI) 1));
	result0 = (*s0)->data[L0];
	(*s0) = (TY_ehmV9bTklH2Gt9cXHV9c0HLeQ*) setLengthSeq(&((*s0))->Sup, sizeof(Tnode_bROa11lyF5vxEN9aYNbHmhw*), ((NI) (L0)));
	return result0;
}
N_NIMCALL(void, doend_291130_930198375)(Tlexer286174* L0, Ttoken286170* tok0) {
	{
		if (!((condstack_291128_930198375 ? (condstack_291128_930198375->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_286378_689113469((&(*L0)), ((Tmsgkind192002) 24), ((NimStringDesc*) &T930198375_7));
	}
	LA3: ;
	ppgettok_291002_930198375(L0, tok0);
	condstack_291128_930198375 = (TY291111*) setLengthSeq(&(condstack_291128_930198375)->Sup, sizeof(NIM_BOOL), ((NI) ((condstack_291128_930198375 ? (condstack_291128_930198375->Sup.len-1) : -1))));
}
Beispiel #17
0
static N_INLINE(TY47008*, Pop_47429)(TY47406** S_47434) {
TY47008* Result_47435;
NI L_47446;
Result_47435 = 0;
L_47446 = 0;
L_47446 = (NI64)((*S_47434)->Sup.len - 1);
Result_47435 = (*S_47434)->data[L_47446];
(*S_47434) = (TY47406*) setLengthSeq(&((*S_47434))->Sup, sizeof(TY47008*), L_47446);
return Result_47435;
}
Beispiel #18
0
N_NIMCALL(void, doend_186191)(Tlexer181185* L, Ttoken181181* tok) {
	nimfr("doEnd", "nimconf.nim")
	nimln(61, "nimconf.nim");
	{
		if (!((condstack_186186 ? (condstack_186186->Sup.len-1) : -1) < ((NI) 0))) goto LA3;
		lexmessage_181483((&(*L)), ((NU16) 23), ((NimStringDesc*) &TMP2481));
	}
	LA3: ;
	nimln(62, "nimconf.nim");
	ppgettok_186009(L, tok);
	nimln(63, "nimconf.nim");
	condstack_186186 = (TY186169*) setLengthSeq(&(condstack_186186)->Sup, sizeof(NIM_BOOL), ((NI)chckRange((condstack_186186 ? (condstack_186186->Sup.len-1) : -1), ((NI) 0), ((NI) IL64(9223372036854775807)))));
	popFrame();
}
Beispiel #19
0
N_NIMCALL(void, prunesocketset_512846)(TY512649** s, fd_set* fd) {
	NI i;
	NI L;
	nimfr("pruneSocketSet", "rawsockets.nim")
	nimln(381, "rawsockets.nim");
	i = ((NI) 0);
	nimln(382, "rawsockets.nim");
	L = ((*s) ? (*s)->Sup.len : 0);
	{
		nimln(383, "rawsockets.nim");
		while (1) {
			if (!(i < L)) goto LA2;
			nimln(384, "rawsockets.nim");
			{
				int LOC5;
				NI TMP10625;
				NI TMP10626;
				if ((NU)(i) >= (NU)((*s)->Sup.len)) raiseIndexError();
				LOC5 = 0;
				LOC5 = FD_ISSET((*s)->data[i], fd);
				if (!(LOC5 == ((NI32) 0))) goto LA6;
				nimln(385, "rawsockets.nim");
				if ((NU)(i) >= (NU)((*s)->Sup.len)) raiseIndexError();
				TMP10625 = subInt(L, ((NI) 1));
				if ((NU)((NI)(TMP10625)) >= (NU)((*s)->Sup.len)) raiseIndexError();
				(*s)->data[i] = (*s)->data[(NI)(TMP10625)];
				nimln(386, "rawsockets.nim");
				TMP10626 = subInt(L, ((NI) 1));
				L = (NI)(TMP10626);
			}
			goto LA3;
			LA6: ;
			{
				NI TMP10627;
				nimln(388, "rawsockets.nim");
				TMP10627 = addInt(i, ((NI) 1));
				i = (NI)(TMP10627);
			}
			LA3: ;
		} LA2: ;
	}
	nimln(389, "rawsockets.nim");
	(*s) = (TY512649*) setLengthSeq(&((*s))->Sup, sizeof(int), ((NI)chckRange(L, ((NI) 0), ((NI) 2147483647))));
	popFrame();
}
Beispiel #20
0
N_NIMCALL(void, doend_182155)(tlexer178176* l, ttoken178174* tok) {
	nimfr("doEnd", "nimconf.nim")
	nimln(61, "nimconf.nim");
	{
		nimln(61, "nimconf.nim");
		nimln(61, "nimconf.nim");
		if (!((condstack_182152->Sup.len-1) < 0)) goto LA3;
		nimln(61, "nimconf.nim");
		lexmessage_178246(&(*l), ((NU16) 23), ((NimStringDesc*) &TMP1905));
	}
	LA3: ;
	nimln(62, "nimconf.nim");
	ppgettok_182008(l, tok);
	nimln(63, "nimconf.nim");
	nimln(63, "nimconf.nim");
	condstack_182152 = (TY182131*) setLengthSeq(&(condstack_182152)->Sup, sizeof(NIM_BOOL), (condstack_182152->Sup.len-1));
	popFrame();
}
Beispiel #21
0
static N_INLINE(trope148007*, pop_148515)(tropeseq148009** s_148523) {
	trope148007* result;
	NI l;
	NI TMP550;
	nimfr("pop", "system.nim")
	result = 0;
	nimln(1692, "system.nim");
	nimln(1692, "system.nim");
	nimln(1692, "system.nim");
	TMP550 = subInt((*s_148523)->Sup.len, 1);
	l = (NI32)(TMP550);
	nimln(1693, "system.nim");
	if ((NU)(l) >= (NU)((*s_148523)->Sup.len)) raiseIndexError();
	result = (*s_148523)->data[l];
	nimln(1694, "system.nim");
	(*s_148523) = (tropeseq148009*) setLengthSeq(&((*s_148523))->Sup, sizeof(trope148007*), l);
	popFrame();
	return result;
}
Beispiel #22
0
N_NIMCALL(void, Addconverter_107058)(TY107012* C_107060, TY55548* Conv_107061) {
NI L_107277;
NI I_107301;
NI HEX3Atmp_107316;
NI Res_107318;
L_107277 = 0;
L_107277 = (*C_107060).Converters->Sup.len;
I_107301 = 0;
HEX3Atmp_107316 = 0;
HEX3Atmp_107316 = (NI32)(L_107277 - 1);
Res_107318 = 0;
Res_107318 = 0;
while (1) {
if (!(Res_107318 <= HEX3Atmp_107316)) goto LA1;
I_107301 = Res_107318;
if (!((*(*C_107060).Converters->data[I_107301]).Sup.Id == (*Conv_107061).Sup.Id)) goto LA3;
goto BeforeRet;
LA3: ;
Res_107318 += 1;
} LA1: ;
(*C_107060).Converters = (TY55528*) setLengthSeq(&((*C_107060).Converters)->Sup, sizeof(TY55548*), (NI32)(L_107277 + 1));
asgnRef((void**) &(*C_107060).Converters->data[L_107277], Conv_107061);
BeforeRet: ;
}
Beispiel #23
0
N_NIMCALL(void, parsedirective_182309)(tlexer178176* l, ttoken178174* tok) {
	NU8 LOC1;
	nimfr("parseDirective", "nimconf.nim")
	nimln(112, "nimconf.nim");
	ppgettok_182008(l, tok);
	nimln(113, "nimconf.nim");
	nimln(113, "nimconf.nim");
	LOC1 = 0;
	LOC1 = whichkeyword_170360((*tok).Ident);
	switch (LOC1) {
	case ((NU8) 28):
	{
		NI TMP1908;
		NIM_BOOL res;
		nimln(115, "nimconf.nim");
		nimln(115, "nimconf.nim");
		nimln(115, "nimconf.nim");
		TMP1908 = addInt(condstack_182152->Sup.len, 1);
		condstack_182152 = (TY182131*) setLengthSeq(&(condstack_182152)->Sup, sizeof(NIM_BOOL), (NI32)(TMP1908));
		nimln(116, "nimconf.nim");
		res = evalppif_182113(l, tok);
		nimln(117, "nimconf.nim");
		nimln(117, "nimconf.nim");
		if ((NU)((condstack_182152->Sup.len-1)) >= (NU)(condstack_182152->Sup.len)) raiseIndexError();
		condstack_182152->data[(condstack_182152->Sup.len-1)] = res;
		nimln(118, "nimconf.nim");
		{
			nimln(118, "nimconf.nim");
			if (!!(res)) goto LA5;
			nimln(118, "nimconf.nim");
			jumptodirective_182185(l, tok, ((NU8) 1));
		}
		LA5: ;
	}
	break;
	case ((NU8) 18):
	{
		nimln(119, "nimconf.nim");
		doelif_182211(l, tok);
	}
	break;
	case ((NU8) 19):
	{
		nimln(120, "nimconf.nim");
		doelse_182193(l, tok);
	}
	break;
	case ((NU8) 20):
	{
		nimln(121, "nimconf.nim");
		doend_182155(l, tok);
	}
	break;
	case ((NU8) 175):
	{
		NimStringDesc* LOC11;
		nimln(123, "nimconf.nim");
		ppgettok_182008(l, tok);
		nimln(124, "nimconf.nim");
		nimln(124, "nimconf.nim");
		LOC11 = 0;
		LOC11 = toktostr_178234(&(*tok));
		msgwriteln_163937(LOC11);
		nimln(125, "nimconf.nim");
		ppgettok_182008(l, tok);
	}
	break;
	default:
	{
		NimStringDesc* LOC13;
		nimln(127, "nimconf.nim");
		nimln(127, "nimconf.nim");
		LOC13 = 0;
		LOC13 = nsuNormalize((*(*tok).Ident).S);
		if (eqStrings(LOC13, ((NimStringDesc*) &TMP1909))) goto LA14;
		if (eqStrings(LOC13, ((NimStringDesc*) &TMP1910))) goto LA15;
		if (eqStrings(LOC13, ((NimStringDesc*) &TMP1911))) goto LA16;
		goto LA17;
		LA14: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC20;
			nimln(129, "nimconf.nim");
			ppgettok_182008(l, tok);
			nimln(130, "nimconf.nim");
			key = toktostr_178234(&(*tok));
			nimln(131, "nimconf.nim");
			ppgettok_182008(l, tok);
			nimln(132, "nimconf.nim");
			nimln(132, "nimconf.nim");
			LOC20 = 0;
			LOC20 = toktostr_178234(&(*tok));
			putenv_112443(key, LOC20);
			nimln(133, "nimconf.nim");
			ppgettok_182008(l, tok);
		}
		goto LA18;
		LA15: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC22;
			NimStringDesc* LOC23;
			NimStringDesc* LOC24;
			nimln(135, "nimconf.nim");
			ppgettok_182008(l, tok);
			nimln(136, "nimconf.nim");
			key = toktostr_178234(&(*tok));
			nimln(137, "nimconf.nim");
			ppgettok_182008(l, tok);
			nimln(138, "nimconf.nim");
			nimln(138, "nimconf.nim");
			LOC22 = 0;
			nimln(138, "nimconf.nim");
			LOC23 = 0;
			LOC23 = toktostr_178234(&(*tok));
			nimln(138, "nimconf.nim");
			LOC24 = 0;
			LOC24 = getenv_112426(key);
			LOC22 = rawNewString(LOC23->Sup.len + LOC24->Sup.len + 0);
appendString(LOC22, LOC23);
appendString(LOC22, LOC24);
			putenv_112443(key, LOC22);
			nimln(139, "nimconf.nim");
			ppgettok_182008(l, tok);
		}
		goto LA18;
		LA16: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC26;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			nimln(141, "nimconf.nim");
			ppgettok_182008(l, tok);
			nimln(142, "nimconf.nim");
			key = toktostr_178234(&(*tok));
			nimln(143, "nimconf.nim");
			ppgettok_182008(l, tok);
			nimln(144, "nimconf.nim");
			nimln(144, "nimconf.nim");
			LOC26 = 0;
			nimln(144, "nimconf.nim");
			LOC27 = 0;
			LOC27 = getenv_112426(key);
			nimln(144, "nimconf.nim");
			LOC28 = 0;
			LOC28 = toktostr_178234(&(*tok));
			LOC26 = rawNewString(LOC27->Sup.len + LOC28->Sup.len + 0);
appendString(LOC26, LOC27);
appendString(LOC26, LOC28);
			putenv_112443(key, LOC26);
			nimln(145, "nimconf.nim");
			ppgettok_182008(l, tok);
		}
		goto LA18;
		LA17: ;
		{
			NimStringDesc* LOC30;
			nimln(146, "nimconf.nim");
			nimln(146, "nimconf.nim");
			LOC30 = 0;
			LOC30 = toktostr_178234(&(*tok));
			lexmessage_178246(&(*l), ((NU16) 30), LOC30);
		}
		LA18: ;
	}
	break;
	}
	popFrame();
}
Beispiel #24
0
N_NIMCALL(void, parsedirective_210246)(Tlexer205173* L, Ttoken205169* tok) {
	NU16 LOC1;
	ppgettok_210003(L, tok);
	LOC1 = 0;
	LOC1 = whichkeyword_196362((*tok).ident);
	switch (LOC1) {
	case ((NU16) 31):
	{
		NIM_BOOL res;
		condstack_210129 = (TY210112*) setLengthSeq(&(condstack_210129)->Sup, sizeof(NIM_BOOL), ((NI) ((NI)((condstack_210129 ? condstack_210129->Sup.len : 0) + ((NI) 1)))));
		res = evalppif_210096(L, tok);
		condstack_210129->data[(condstack_210129 ? (condstack_210129->Sup.len-1) : -1)] = res;
		{
			if (!!(res)) goto LA5;
			jumptodirective_210151(L, tok, ((NU8) 1));
		}
		LA5: ;
	}
	break;
	case ((NU16) 20):
	{
		doelif_210173(L, tok);
	}
	break;
	case ((NU16) 21):
	{
		doelse_210158(L, tok);
	}
	break;
	case ((NU16) 22):
	{
		doend_210131(L, tok);
	}
	break;
	case ((NU16) 183):
	{
		NimStringDesc* LOC11;
		NimStringDesc* LOC12;
		ppgettok_210003(L, tok);
		LOC11 = 0;
		LOC11 = toktostr_205281((&(*tok)));
		LOC12 = 0;
		LOC12 = nstFormat(LOC11, gconfigvars_160195, 5);
		msgwriteln_183449(LOC12, 0);
		ppgettok_210003(L, tok);
	}
	break;
	default:
	{
		NimStringDesc* LOC14;
		LOC14 = 0;
		LOC14 = nsuNormalize((*(*tok).ident).s);
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2041))) goto LA15;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2042))) goto LA16;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2043))) goto LA17;
		goto LA18;
		LA15: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC21;
			ppgettok_210003(L, tok);
			key = toktostr_205281((&(*tok)));
			ppgettok_210003(L, tok);
			LOC21 = 0;
			LOC21 = toktostr_205281((&(*tok)));
			putenv_125838(key, LOC21);
			ppgettok_210003(L, tok);
		}
		goto LA19;
		LA16: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC23;
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			ppgettok_210003(L, tok);
			key = toktostr_205281((&(*tok)));
			ppgettok_210003(L, tok);
			LOC23 = 0;
			LOC24 = 0;
			LOC24 = toktostr_205281((&(*tok)));
			LOC25 = 0;
			LOC25 = getenv_125825(key);
			LOC23 = rawNewString(LOC24->Sup.len + LOC25->Sup.len + 0);
appendString(LOC23, LOC24);
appendString(LOC23, LOC25);
			putenv_125838(key, LOC23);
			ppgettok_210003(L, tok);
		}
		goto LA19;
		LA17: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			NimStringDesc* LOC29;
			ppgettok_210003(L, tok);
			key = toktostr_205281((&(*tok)));
			ppgettok_210003(L, tok);
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = getenv_125825(key);
			LOC29 = 0;
			LOC29 = toktostr_205281((&(*tok)));
			LOC27 = rawNewString(LOC28->Sup.len + LOC29->Sup.len + 0);
appendString(LOC27, LOC28);
appendString(LOC27, LOC29);
			putenv_125838(key, LOC27);
			ppgettok_210003(L, tok);
		}
		goto LA19;
		LA18: ;
		{
			NimStringDesc* LOC31;
			LOC31 = 0;
			LOC31 = toktostr_205281((&(*tok)));
			lexmessage_205370((&(*L)), ((NU16) 31), LOC31);
		}
		LA19: ;
	}
	break;
	}
}
Beispiel #25
0
N_NIMCALL(NimStringDesc*, getmodulename_259012)(tnode191813* n) {
	NimStringDesc* result;
	nimfr("getModuleName", "importer.nim")
	result = 0;
	nimln(23, "importer.nim");
	switch ((*n).Kind) {
	case ((NU8) 20):
	case ((NU8) 21):
	case ((NU8) 22):
	{
		nimln(25, "importer.nim");
		if (!(((TMP3269[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3270));
		result = nosunixToNativePath((*n).kindU.S3.Strval, ((NimStringDesc*) &TMP3271));
	}
	break;
	case ((NU8) 2):
	{
		nimln(27, "importer.nim");
		if (!(((TMP3272[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3273));
		result = copyString((*(*n).kindU.S5.Ident).S);
	}
	break;
	case ((NU8) 3):
	{
		nimln(29, "importer.nim");
		if (!(((TMP3274[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3275));
		result = copyString((*(*(*n).kindU.S4.Sym).Name).S);
	}
	break;
	case ((NU8) 29):
	{
		NimStringDesc* LOC13;
		nimln(31, "importer.nim");
		{
			NIM_BOOL LOC7;
			tident170019* LOC9;
			NU8 LOC12;
			nimln(31, "importer.nim");
			LOC7 = 0;
			nimln(31, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			LOC7 = ((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 2));
			if (!(LOC7)) goto LA8;
			nimln(31, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!(((TMP3272[(*(*n).kindU.S6.Sons->data[0]).Kind/8] &(1<<((*(*n).kindU.S6.Sons->data[0]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3273));
			nimln(31, "importer.nim");
			LOC9 = 0;
			LOC9 = getident_170456(((NimStringDesc*) &TMP3278));
			LOC7 = ((*(*(*n).kindU.S6.Sons->data[0]).kindU.S5.Ident).Sup.Id == (*LOC9).Sup.Id);
			LA8: ;
			if (!LOC7) goto LA10;
			nimln(33, "importer.nim");
			LOC12 = 0;
			LOC12 = ((NU8) 78);
			FieldDiscriminantCheck((NI)(NU)((*n).Kind), (NI)(NU)(LOC12), NimDT_tnode_kind, 158);
			(*n).Kind = LOC12;
			nimln(34, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(1) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[1]);
			nimln(35, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(1) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(2) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[1], (*n).kindU.S6.Sons->data[2]);
			nimln(36, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			(*n).kindU.S6.Sons = (tnodeseq191807*) setLengthSeq(&((*n).kindU.S6.Sons)->Sup, sizeof(tnode191813*), 2);
			nimln(37, "importer.nim");
			nimln(37, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			result = getmodulename_259012((*n).kindU.S6.Sons->data[0]);
			goto BeforeRet;
		}
		LA10: ;
		nimln(39, "importer.nim");
		nimln(39, "importer.nim");
		LOC13 = 0;
		LOC13 = rendertree_215051(n, 4);
		result = nsuReplaceStr(LOC13, ((NimStringDesc*) &TMP3279), ((NimStringDesc*) &TMP3271));
	}
	break;
	case ((NU8) 45):
	{
		NimStringDesc* LOC15;
		nimln(41, "importer.nim");
		nimln(41, "importer.nim");
		LOC15 = 0;
		LOC15 = rendertree_215051(n, 4);
		result = nsuReplaceStr(LOC15, ((NimStringDesc*) &TMP3280), ((NimStringDesc*) &TMP3281));
	}
	break;
	case ((NU8) 78):
	{
		nimln(43, "importer.nim");
		if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
		if ((NU)(0) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		result = getmodulename_259012((*n).kindU.S6.Sons->data[0]);
	}
	break;
	default:
	{
		NimStringDesc* LOC18;
		NimStringDesc* LOC19;
		nimln(45, "importer.nim");
		nimln(45, "importer.nim");
		nimln(45, "importer.nim");
		LOC18 = 0;
		LOC18 = rendertree_215051(n, 0);
		LOC19 = 0;
		LOC19 = nsuFormatSingleElem(((NimStringDesc*) &TMP3282), LOC18);
		localerror_168571((*n).Info, ((NU16) 4), LOC19);
		nimln(46, "importer.nim");
		result = copyString(((NimStringDesc*) &TMP3271));
	}
	break;
	}
	BeforeRet: ;
	popFrame();
	return result;
}
Beispiel #26
0
N_NIMCALL(void, parsedirective_185344)(Tlexer180185* L, Ttoken180181* tok) {
	NU16 LOC1;
	ppgettok_185009(L, tok);
	LOC1 = 0;
	LOC1 = whichkeyword_171386((*tok).ident);
	switch (LOC1) {
	case ((NU16) 31):
	{
		NIM_BOOL res;
		condstack_185188 = (TY185169*) setLengthSeq(&(condstack_185188)->Sup, sizeof(NIM_BOOL), ((NI) ((NI)((condstack_185188 ? condstack_185188->Sup.len : 0) + ((NI) 1)))));
		res = evalppif_185147(L, tok);
		condstack_185188->data[(condstack_185188 ? (condstack_185188->Sup.len-1) : -1)] = res;
		{
			if (!!(res)) goto LA5;
			jumptodirective_185222(L, tok, ((NU8) 1));
		}
		LA5: ;
	}
	break;
	case ((NU16) 20):
	{
		doelif_185253(L, tok);
	}
	break;
	case ((NU16) 21):
	{
		doelse_185232(L, tok);
	}
	break;
	case ((NU16) 22):
	{
		doend_185193(L, tok);
	}
	break;
	case ((NU16) 180):
	{
		NimStringDesc* LOC11;
		NimStringDesc* LOC12;
		ppgettok_185009(L, tok);
		LOC11 = 0;
		LOC11 = toktostr_180323((&(*tok)));
		LOC12 = 0;
		LOC12 = nstFormat(LOC11, gconfigvars_153231, 5);
		msgwriteln_163538(LOC12);
		ppgettok_185009(L, tok);
	}
	break;
	default:
	{
		NimStringDesc* LOC14;
		LOC14 = 0;
		LOC14 = nsuNormalize((*(*tok).ident).s);
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP1883))) goto LA15;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP1884))) goto LA16;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP1885))) goto LA17;
		goto LA18;
		LA15: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC21;
			ppgettok_185009(L, tok);
			key = toktostr_180323((&(*tok)));
			ppgettok_185009(L, tok);
			LOC21 = 0;
			LOC21 = toktostr_180323((&(*tok)));
			putenv_121669(key, LOC21);
			ppgettok_185009(L, tok);
		}
		goto LA19;
		LA16: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC23;
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			ppgettok_185009(L, tok);
			key = toktostr_180323((&(*tok)));
			ppgettok_185009(L, tok);
			LOC23 = 0;
			LOC24 = 0;
			LOC24 = toktostr_180323((&(*tok)));
			LOC25 = 0;
			LOC25 = getenv_121644(key);
			LOC23 = rawNewString(LOC24->Sup.len + LOC25->Sup.len + 0);
appendString(LOC23, LOC24);
appendString(LOC23, LOC25);
			putenv_121669(key, LOC23);
			ppgettok_185009(L, tok);
		}
		goto LA19;
		LA17: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			NimStringDesc* LOC29;
			ppgettok_185009(L, tok);
			key = toktostr_180323((&(*tok)));
			ppgettok_185009(L, tok);
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = getenv_121644(key);
			LOC29 = 0;
			LOC29 = toktostr_180323((&(*tok)));
			LOC27 = rawNewString(LOC28->Sup.len + LOC29->Sup.len + 0);
appendString(LOC27, LOC28);
appendString(LOC27, LOC29);
			putenv_121669(key, LOC27);
			ppgettok_185009(L, tok);
		}
		goto LA19;
		LA18: ;
		{
			NimStringDesc* LOC31;
			LOC31 = 0;
			LOC31 = toktostr_180323((&(*tok)));
			lexmessage_180483((&(*L)), ((NU16) 30), LOC31);
		}
		LA19: ;
	}
	break;
	}
}
Beispiel #27
0
N_NIMCALL(void, loadfile_248043)(Tlineinfo163338 info) {
	NI32 i;
	i = info.fileindex;
	{
		if (!((gsourcefiles_248038 ? gsourcefiles_248038->Sup.len : 0) <= ((NI) (i)))) goto LA3;
		gsourcefiles_248038 = (TY248019*) setLengthSeq(&(gsourcefiles_248038)->Sup, sizeof(Tsourcefile248008), ((NI) ((NI32)(i + ((NI32) 1)))));
	}
	LA3: ;
	{
		NimStringDesc* path;
		NimStringDesc* LOC9;
		TY118589 LOC10;
		Baselexer246024 lex;
		Filestreamobj137692* LOC16;
		Streamobj137027* LOC17;
		NI pos;
		if (!gsourcefiles_248038->data[i].lines == 0) goto LA7;
		gsourcefiles_248038->data[i].fileidx = info.fileindex;
		if (gsourcefiles_248038->data[i].lines) nimGCunrefNoCycle(gsourcefiles_248038->data[i].lines);
		gsourcefiles_248038->data[i].lines = (TY121008*) newSeqRC1((&NTI121008), 0);
		path = tofullpath_164284(info.fileindex);
		LOC9 = 0;
		LOC9 = gsourcefiles_248038->data[i].fullpath; gsourcefiles_248038->data[i].fullpath = copyStringRC1(path);
		if (LOC9) nimGCunrefNoCycle(LOC9);
		memset((void*)(&LOC10), 0, sizeof(LOC10));
		nossplitFile(path, (&LOC10));
		gsourcefiles_248038->data[i].isnimfixfile = eqStrings(LOC10.Field2, ((NimStringDesc*) &TMP2680));
		{
			NimStringDesc* line_248092;
			FILE* f_248119;
			NimStringDesc* res_248121;
			line_248092 = 0;
			f_248119 = open_13217(path, ((NU8) 0), ((NI) 8000));
			res_248121 = rawNewString(((NI) 80));
			{
				while (1) {
					NIM_BOOL LOC14;
					NimStringDesc* LOC15;
					LOC14 = 0;
					LOC14 = readline_13481(f_248119, (&res_248121));
					if (!LOC14) goto LA13;
					line_248092 = res_248121;
					gsourcefiles_248038->data[i].lines = (TY121008*) incrSeq(&(gsourcefiles_248038->data[i].lines)->Sup, sizeof(NimStringDesc*));
					LOC15 = 0;
					LOC15 = gsourcefiles_248038->data[i].lines->data[gsourcefiles_248038->data[i].lines->Sup.len-1]; gsourcefiles_248038->data[i].lines->data[gsourcefiles_248038->data[i].lines->Sup.len-1] = copyStringRC1(line_248092);
					if (LOC15) nimGCunrefNoCycle(LOC15);
				} LA13: ;
			}
			fclose(f_248119);
		}
		memset((void*)(&lex), 0, sizeof(lex));
		lex.Sup.m_type = (&NTI246024);
		LOC16 = 0;
		LOC16 = newfilestream_137773(path, ((NU8) 0));
		LOC17 = 0;
		LOC17 = &LOC16->Sup;
		open_246040((&lex), LOC17, ((NI) 8192));
		pos = lex.bufpos;
		{
			while (1) {
				switch (((NU8)(lex.buf[pos]))) {
				case 13:
				{
					NimStringDesc* LOC21;
					LOC21 = 0;
					LOC21 = gsourcefiles_248038->data[i].newline; gsourcefiles_248038->data[i].newline = copyStringRC1(((NimStringDesc*) &TMP2688));
					if (LOC21) nimGCunrefNoCycle(LOC21);
					goto LA18;
				}
				break;
				case 10:
				case 0:
				{
					NimStringDesc* LOC23;
					LOC23 = 0;
					LOC23 = gsourcefiles_248038->data[i].newline; gsourcefiles_248038->data[i].newline = copyStringRC1(((NimStringDesc*) &TMP2689));
					if (LOC23) nimGCunrefNoCycle(LOC23);
					goto LA18;
				}
				break;
				default:
				{
				}
				break;
				}
				pos += ((NI) 1);
			}
		} LA18: ;
		close_246050((&lex));
	}
	LA7: ;
}
Beispiel #28
0
N_NIMCALL(void, ropeseqinsert_144403)(tropeseq144009** rs, trope144007* r, NI at) {
    NI length;
    NI i_144467;
    NI HEX3Atmp_144468;
    NI TMP544;
    NI res_144470;
    nimfr("ropeSeqInsert", "ropes.nim")
    nimln(163, "ropes.nim");
    nimln(163, "ropes.nim");
    length = (*rs)->Sup.len;
    nimln(164, "ropes.nim");
    {
        NI TMP542;
        nimln(164, "ropes.nim");
        if (!(length < ((NI) (at)))) goto LA3;
        nimln(165, "ropes.nim");
        nimln(165, "ropes.nim");
        TMP542 = addInt(((NI) (at)), 1);
        (*rs) = (tropeseq144009*) setLengthSeq(&((*rs))->Sup, sizeof(trope144007*), ((NI) ((NI64)(TMP542))));
    }
    goto LA1;
LA3:
    ;
    {
        NI TMP543;
        nimln(167, "ropes.nim");
        nimln(167, "ropes.nim");
        TMP543 = addInt(length, 1);
        (*rs) = (tropeseq144009*) setLengthSeq(&((*rs))->Sup, sizeof(trope144007*), (NI64)(TMP543));
    }
LA1:
    ;
    i_144467 = 0;
    HEX3Atmp_144468 = 0;
    nimln(168, "ropes.nim");
    nimln(168, "ropes.nim");
    TMP544 = addInt(((NI) (at)), 1);
    HEX3Atmp_144468 = ((NI) ((NI64)(TMP544)));
    nimln(1441, "system.nim");
    res_144470 = length;
    nimln(1442, "system.nim");
    while (1) {
        NI TMP545;
        nimln(1442, "system.nim");
        if (!(HEX3Atmp_144468 <= res_144470)) goto LA6;
        nimln(1441, "system.nim");
        i_144467 = res_144470;
        nimln(169, "ropes.nim");
        if ((NU)(i_144467) >= (NU)((*rs)->Sup.len)) raiseIndexError();
        nimln(169, "ropes.nim");
        TMP545 = subInt(i_144467, 1);
        if ((NU)((NI64)(TMP545)) >= (NU)((*rs)->Sup.len)) raiseIndexError();
        asgnRefNoCycle((void**) &(*rs)->data[i_144467], (*rs)->data[(NI64)(TMP545)]);
        nimln(1444, "system.nim");
        res_144470 = subInt(res_144470, 1);
    }
LA6:
    ;
    nimln(170, "ropes.nim");
    if ((NU)(at) >= (NU)((*rs)->Sup.len)) raiseIndexError();
    asgnRefNoCycle((void**) &(*rs)->data[at], r);
    popFrame();
}
Beispiel #29
0
N_NIMCALL(void, Parsedirective_80288)(TY77267* L_80291, TY77263* Tok_80292) {
NIM_BOOL Res_80293;
NimStringDesc* Key_80294;
NU8 LOC1;
NimStringDesc* LOC5;
NimStringDesc* LOC6;
NimStringDesc* LOC7;
NimStringDesc* LOC8;
NimStringDesc* LOC9;
NimStringDesc* LOC10;
NimStringDesc* LOC11;
NimStringDesc* LOC12;
NimStringDesc* LOC13;
Res_80293 = 0;
Key_80294 = 0;
Ppgettok_80010(L_80291, Tok_80292);
LOC1 = Whichkeyword_72479((*Tok_80292).Ident);
switch (LOC1) {
case ((NU8) 26):
Condstack_80133 = (TY80132*) setLengthSeq(&(Condstack_80133)->Sup, sizeof(NIM_BOOL), (NI32)(Condstack_80133->Sup.len + 1));
Res_80293 = Evalppif_80117(L_80291, Tok_80292);
Condstack_80133->data[(Condstack_80133->Sup.len-1)] = Res_80293;
if (!!(Res_80293)) goto LA3;
Jumptodirective_80175(L_80291, Tok_80292, ((NU8) 1));
LA3: ;
break;
case ((NU8) 17):
Doelif_80199(L_80291, Tok_80292);
break;
case ((NU8) 18):
Doelse_80181(L_80291, Tok_80292);
break;
case ((NU8) 19):
Doend_80150(L_80291, Tok_80292);
break;
case ((NU8) 217):
Ppgettok_80010(L_80291, Tok_80292);
LOC5 = 0;
LOC5 = Toktostr_77323(Tok_80292);
Messageout_47775(LOC5);
Ppgettok_80010(L_80291, Tok_80292);
break;
case ((NU8) 218):
Ppgettok_80010(L_80291, Tok_80292);
Key_80294 = Toktostr_77323(Tok_80292);
Ppgettok_80010(L_80291, Tok_80292);
LOC6 = 0;
LOC6 = Toktostr_77323(Tok_80292);
Putenv_39432(Key_80294, LOC6);
Ppgettok_80010(L_80291, Tok_80292);
break;
case ((NU8) 219):
Ppgettok_80010(L_80291, Tok_80292);
Key_80294 = Toktostr_77323(Tok_80292);
Ppgettok_80010(L_80291, Tok_80292);
LOC7 = 0;
LOC8 = 0;
LOC8 = Toktostr_77323(Tok_80292);
LOC9 = 0;
LOC9 = Getenv_39418(Key_80294);
LOC7 = rawNewString(LOC8->Sup.len + LOC9->Sup.len + 0);
appendString(LOC7, LOC8);
appendString(LOC7, LOC9);
Putenv_39432(Key_80294, LOC7);
Ppgettok_80010(L_80291, Tok_80292);
break;
case ((NU8) 220):
Ppgettok_80010(L_80291, Tok_80292);
Key_80294 = Toktostr_77323(Tok_80292);
Ppgettok_80010(L_80291, Tok_80292);
LOC10 = 0;
LOC11 = 0;
LOC11 = Getenv_39418(Key_80294);
LOC12 = 0;
LOC12 = Toktostr_77323(Tok_80292);
LOC10 = rawNewString(LOC11->Sup.len + LOC12->Sup.len + 0);
appendString(LOC10, LOC11);
appendString(LOC10, LOC12);
Putenv_39432(Key_80294, LOC10);
Ppgettok_80010(L_80291, Tok_80292);
break;
default:
LOC13 = 0;
LOC13 = Toktostr_77323(Tok_80292);
Lexmessage_77326(&(*L_80291), ((NU8) 28), LOC13);
break;
}
}
Beispiel #30
0
N_NIMCALL(void, parsedirective_186342)(Tlexer181185* L, Ttoken181181* tok) {
	NU16 LOC1;
	nimfr("parseDirective", "nimconf.nim")
	nimln(112, "nimconf.nim");
	ppgettok_186009(L, tok);
	nimln(113, "nimconf.nim");
	LOC1 = 0;
	LOC1 = whichkeyword_172386((*tok).ident);
	switch (LOC1) {
	case ((NU16) 31):
	{
		NI TMP2486;
		NIM_BOOL res;
		nimln(115, "nimconf.nim");
		TMP2486 = addInt((condstack_186186 ? condstack_186186->Sup.len : 0), ((NI) 1));
		condstack_186186 = (TY186169*) setLengthSeq(&(condstack_186186)->Sup, sizeof(NIM_BOOL), ((NI)chckRange((NI)(TMP2486), ((NI) 0), ((NI) IL64(9223372036854775807)))));
		nimln(116, "nimconf.nim");
		res = evalppif_186147(L, tok);
		nimln(117, "nimconf.nim");
		if ((NU)((condstack_186186 ? (condstack_186186->Sup.len-1) : -1)) >= (NU)(condstack_186186->Sup.len)) raiseIndexError();
		condstack_186186->data[(condstack_186186 ? (condstack_186186->Sup.len-1) : -1)] = res;
		nimln(118, "nimconf.nim");
		{
			if (!!(res)) goto LA5;
			jumptodirective_186220(L, tok, ((NU8) 1));
		}
		LA5: ;
	}
	break;
	case ((NU16) 20):
	{
		nimln(119, "nimconf.nim");
		doelif_186251(L, tok);
	}
	break;
	case ((NU16) 21):
	{
		nimln(120, "nimconf.nim");
		doelse_186230(L, tok);
	}
	break;
	case ((NU16) 22):
	{
		nimln(121, "nimconf.nim");
		doend_186191(L, tok);
	}
	break;
	case ((NU16) 180):
	{
		NimStringDesc* LOC11;
		NimStringDesc* LOC12;
		nimln(123, "nimconf.nim");
		ppgettok_186009(L, tok);
		nimln(124, "nimconf.nim");
		LOC11 = 0;
		LOC11 = toktostr_181323((&(*tok)));
		LOC12 = 0;
		LOC12 = nstFormat(LOC11, gconfigvars_154231, 5);
		msgwriteln_164536(LOC12);
		nimln(126, "nimconf.nim");
		ppgettok_186009(L, tok);
	}
	break;
	default:
	{
		NimStringDesc* LOC14;
		nimln(128, "nimconf.nim");
		LOC14 = 0;
		LOC14 = nsuNormalize((*(*tok).ident).s);
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2487))) goto LA15;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2488))) goto LA16;
		if (eqStrings(LOC14, ((NimStringDesc*) &TMP2489))) goto LA17;
		goto LA18;
		LA15: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC21;
			nimln(130, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(131, "nimconf.nim");
			key = toktostr_181323((&(*tok)));
			nimln(132, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(133, "nimconf.nim");
			LOC21 = 0;
			LOC21 = toktostr_181323((&(*tok)));
			putenv_122669(key, LOC21);
			nimln(134, "nimconf.nim");
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA16: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC23;
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			nimln(136, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(137, "nimconf.nim");
			key = toktostr_181323((&(*tok)));
			nimln(138, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(139, "nimconf.nim");
			LOC23 = 0;
			LOC24 = 0;
			LOC24 = toktostr_181323((&(*tok)));
			LOC25 = 0;
			LOC25 = getenv_122644(key);
			LOC23 = rawNewString(LOC24->Sup.len + LOC25->Sup.len + 0);
appendString(LOC23, LOC24);
appendString(LOC23, LOC25);
			putenv_122669(key, LOC23);
			nimln(140, "nimconf.nim");
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA17: ;
		{
			NimStringDesc* key;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			NimStringDesc* LOC29;
			nimln(142, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(143, "nimconf.nim");
			key = toktostr_181323((&(*tok)));
			nimln(144, "nimconf.nim");
			ppgettok_186009(L, tok);
			nimln(145, "nimconf.nim");
			LOC27 = 0;
			LOC28 = 0;
			LOC28 = getenv_122644(key);
			LOC29 = 0;
			LOC29 = toktostr_181323((&(*tok)));
			LOC27 = rawNewString(LOC28->Sup.len + LOC29->Sup.len + 0);
appendString(LOC27, LOC28);
appendString(LOC27, LOC29);
			putenv_122669(key, LOC27);
			nimln(146, "nimconf.nim");
			ppgettok_186009(L, tok);
		}
		goto LA19;
		LA18: ;
		{
			NimStringDesc* LOC31;
			nimln(147, "nimconf.nim");
			LOC31 = 0;
			LOC31 = toktostr_181323((&(*tok)));
			lexmessage_181483((&(*L)), ((NU16) 30), LOC31);
		}
		LA19: ;
	}
	break;
	}
	popFrame();
}