N_NIMCALL(void, readconfigfile_186522)(NimStringDesc* filename) { Tlexer181185 L; Ttoken181181 tok; Tllstream178204* stream; memset((void*)(&L), 0, sizeof(L)); L.Sup.Sup.m_type = (&NTI181185); memset((void*)(&tok), 0, sizeof(tok)); stream = 0; stream = llstreamopen_178256(filename, ((NU8) 0)); { if (!!((stream == NIM_NIL))) goto LA3; inittoken_181369((&tok)); openlexer_181412((&L), filename, stream); tok.toktype = ((NU8) 1); conftok_186379((&L), (&tok)); { while (1) { if (!!((tok.toktype == ((NU8) 1)))) goto LA6; parseassignment_186441((&L), (&tok)); } LA6: ; } { if (!(((NI) 0) < (condstack_186188 ? condstack_186188->Sup.len : 0))) goto LA9; lexmessage_181483((&L), ((NU16) 23), ((NimStringDesc*) &TMP1881)); } LA9: ; closelexer_181424((&L)); { if (!(((NI) 1) <= gverbosity_154137)) goto LA13; rawmessage_164970(((NU16) 272), filename); } LA13: ; } LA3: ; }
N_NIMCALL(void, readconfigfile_186520)(NimStringDesc* filename) { Tlexer181185 L; Ttoken181181 tok; Tllstream178204* stream; nimfr("readConfigFile", "nimconf.nim") memset((void*)(&L), 0, sizeof(L)); L.Sup.Sup.m_type = (&NTI181185); memset((void*)(&tok), 0, sizeof(tok)); stream = 0; nimln(205, "nimconf.nim"); stream = llstreamopen_178256(filename, ((NU8) 0)); nimln(206, "nimconf.nim"); { if (!!((stream == NIM_NIL))) goto LA3; nimln(207, "nimconf.nim"); inittoken_181369((&tok)); nimln(208, "nimconf.nim"); openlexer_181412((&L), filename, stream); nimln(209, "nimconf.nim"); tok.toktype = ((NU8) 1); nimln(210, "nimconf.nim"); conftok_186377((&L), (&tok)); { nimln(211, "nimconf.nim"); while (1) { if (!!((tok.toktype == ((NU8) 1)))) goto LA6; parseassignment_186439((&L), (&tok)); } LA6: ; } nimln(212, "nimconf.nim"); { if (!(((NI) 0) < (condstack_186186 ? condstack_186186->Sup.len : 0))) goto LA9; lexmessage_181483((&L), ((NU16) 23), ((NimStringDesc*) &TMP2485)); } LA9: ; nimln(213, "nimconf.nim"); closelexer_181424((&L)); nimln(214, "nimconf.nim"); { if (!(((NI) 1) <= gverbosity_154137)) goto LA13; rawmessage_164960(((NU16) 272), filename); } LA13: ; } LA3: ; popFrame(); }
N_NIMCALL(void, processmodule_241056)(Tsym191843* module, Tllstream178204* stream, Trodreader233030* rd) { Tparsers219035 p; Tpasscontextarray241168 a; Tllstream178204* s; NI32 fileidx; { memset((void*)(&p), 0, sizeof(p)); objectInit((&p), (&NTI219035)); memset((void*)a, 0, sizeof(a)); s = 0; fileidx = ((NI32) ((*module).position)); { if (!(rd == NIM_NIL)) goto LA3; openpasses_241293(a, module); { NimStringDesc* filename; if (!(stream == NIM_NIL)) goto LA7; filename = tofullpathconsiderdirty_164407(fileidx); { NimStringDesc* LOC13; if (!eqStrings((*(*module).name).s, ((NimStringDesc*) &TMP1507))) goto LA11; LOC13 = 0; LOC13 = (*(*module).name).s; (*(*module).name).s = copyStringRC1(((NimStringDesc*) &TMP1508)); if (LOC13) nimGCunrefNoCycle(LOC13); s = llstreamopen_178238(stdin); } goto LA9; LA11: ; { s = llstreamopen_178256(filename, ((NU8) 0)); } LA9: ; { if (!(s == NIM_NIL)) goto LA17; rawmessage_164970(((NU16) 3), filename); goto BeforeRet; } LA17: ; } goto LA5; LA7: ; { s = stream; } LA5: ; { while (1) { openparsers_219047((&p), fileidx, s); { if (!!((((*module).flags &(1<<((((NU8) 13))&31)))!=0))) goto LA24; processimplicits_241621(implicitimports_154280, ((NU8) 116), a); processimplicits_241621(implicitincludes_154300, ((NU8) 121), a); } LA24: ; { while (1) { Tnode191813* n; n = parsetoplevelstmt_219070((&p)); { if (!((*n).kind == ((NU8) 1))) goto LA30; goto LA26; } LA30: ; { NIM_BOOL LOC34; LOC34 = 0; LOC34 = processtoplevelstmt_241454(n, a); if (!!(LOC34)) goto LA35; goto LA26; } LA35: ; } } LA26: ; closeparsers_219056((&p)); { if (!!(((*s).kind == ((NU8) 3)))) goto LA39; goto LA20; } LA39: ; } } LA20: ; closepasses_241404(a); idsynchronizationpoint_190453(((NI) 1000)); } goto LA1; LA3: ; { Tnode191813* n; openpassescached_241342(a, module, rd); n = loadinitsection_233077(rd); { NI i_241766; NI HEX3Atmp_241777; NI LOC43; NI res_241780; i_241766 = 0; HEX3Atmp_241777 = 0; LOC43 = 0; LOC43 = sonslen_194403(n); HEX3Atmp_241777 = (NI)(LOC43 - ((NI) 1)); res_241780 = ((NI) 0); { while (1) { if (!(res_241780 <= HEX3Atmp_241777)) goto LA45; i_241766 = res_241780; processtoplevelstmtcached_241513((*n).kindU.S6.sons->data[i_241766], a); res_241780 += ((NI) 1); } LA45: ; } } closepassescached_241563(a); } LA1: ; }BeforeRet: ; }