Ejemplo n.º 1
0
N_NIMCALL(NI32, checkmodulename_259227)(tnode191813* n) {
	NI32 result;
	NimStringDesc* modulename;
	NimStringDesc* fullpath;
	NimStringDesc* LOC1;
	nimfr("checkModuleName", "importer.nim")
	result = 0;
	nimln(50, "importer.nim");
	modulename = getmodulename_259012(n);
	nimln(51, "importer.nim");
	nimln(51, "importer.nim");
	LOC1 = 0;
	LOC1 = tofullpath_167788((*n).Info.Fileindex);
	fullpath = findmodule_139312(modulename, LOC1);
	nimln(52, "importer.nim");
	{
		nimln(52, "importer.nim");
		nimln(52, "importer.nim");
		if (!(fullpath->Sup.len == 0)) goto LA4;
		nimln(53, "importer.nim");
		localerror_168571((*n).Info, ((NU16) 3), modulename);
		nimln(54, "importer.nim");
		result = ((NI32) -1);
	}
	goto LA2;
	LA4: ;
	{
		nimln(56, "importer.nim");
		result = fileinfoidx_166721(fullpath);
	}
	LA2: ;
	popFrame();
	return result;
}
Ejemplo n.º 2
0
N_NIMCALL(tsym191843*, importmoduleas_259873)(tnode191813* n, tsym191843* realmodule) {
	tsym191843* result;
	nimfr("importModuleAs", "importer.nim")
	result = 0;
	nimln(150, "importer.nim");
	result = realmodule;
	nimln(151, "importer.nim");
	{
		nimln(151, "importer.nim");
		nimln(151, "importer.nim");
		if (!!(((*n).Kind == ((NU8) 78)))) goto LA3;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		NI LOC7;
		nimln(152, "importer.nim");
		LOC6 = 0;
		nimln(152, "importer.nim");
		nimln(152, "importer.nim");
		nimln(152, "importer.nim");
		LOC7 = 0;
		LOC7 = len_192274(n);
		LOC6 = !((LOC7 == 2));
		if (LOC6) goto LA8;
		nimln(152, "importer.nim");
		nimln(152, "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();
		LOC6 = !(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 2)));
		LA8: ;
		if (!LOC6) goto LA9;
		nimln(153, "importer.nim");
		localerror_168571((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3292));
	}
	goto LA1;
	LA9: ;
	{
		nimln(154, "importer.nim");
		nimln(154, "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 (!(((TMP3272[(*(*n).kindU.S6.Sons->data[1]).Kind/8] &(1<<((*(*n).kindU.S6.Sons->data[1]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3273));
		if (!!(((*(*(*n).kindU.S6.Sons->data[1]).kindU.S5.Ident).Sup.Id == (*(*realmodule).Name).Sup.Id))) goto LA12;
		nimln(156, "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 (!(((TMP3272[(*(*n).kindU.S6.Sons->data[1]).Kind/8] &(1<<((*(*n).kindU.S6.Sons->data[1]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3273));
		if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
		if ((NU)(1) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
		result = createmodulealias_194841(realmodule, (*(*n).kindU.S6.Sons->data[1]).kindU.S5.Ident, (*(*n).kindU.S6.Sons->data[1]).Info);
	}
	goto LA1;
	LA12: ;
	LA1: ;
	popFrame();
	return result;
}
Ejemplo n.º 3
0
N_NIMCALL(void, patternerror_280040)(tnode191813* n) {
	NimStringDesc* LOC1;
	nimfr("patternError", "parampatterns.nim")
	nimln(45, "parampatterns.nim");
	nimln(45, "parampatterns.nim");
	LOC1 = 0;
	LOC1 = rendertree_215051(n, 4);
	localerror_168571((*n).Info, ((NU16) 1), LOC1);
	popFrame();
}
Ejemplo n.º 4
0
N_NIMCALL(tnode191813*, evaltemplateargs_395174)(tnode191813* n, tsym191843* s) {
	tnode191813* result;
	NI a;
	NI f;
	NI i_395194;
	NI HEX3Atmp_395266;
	NI TMP5467;
	NI res_395268;
	nimfr("evalTemplateArgs", "evaltempl.nim")
	result = 0;
	a = 0;
	nimln(60, "evaltempl.nim");
	switch ((*n).Kind) {
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	{
		nimln(62, "evaltempl.nim");
		a = sonslen_192191(n);
	}
	break;
	default:
	{
		nimln(63, "evaltempl.nim");
		a = 0;
	}
	break;
	}
	nimln(64, "evaltempl.nim");
	f = sonslen_192195((*s).Typ);
	nimln(65, "evaltempl.nim");
	{
		nimln(65, "evaltempl.nim");
		if (!(f < a)) goto LA5;
		nimln(65, "evaltempl.nim");
		globalerror_168558((*n).Info, ((NU16) 133), ((NimStringDesc*) &TMP5466));
	}
	LA5: ;
	nimln(67, "evaltempl.nim");
	result = newnodei_192109(((NU8) 150), (*n).Info);
	i_395194 = 0;
	HEX3Atmp_395266 = 0;
	nimln(68, "evaltempl.nim");
	nimln(68, "evaltempl.nim");
	TMP5467 = subInt(f, 1);
	HEX3Atmp_395266 = (NI64)(TMP5467);
	nimln(1451, "system.nim");
	res_395268 = 1;
	nimln(1452, "system.nim");
	while (1) {
		tnode191813* arg;
		nimln(1452, "system.nim");
		if (!(res_395268 <= HEX3Atmp_395266)) goto LA7;
		nimln(1451, "system.nim");
		i_395194 = res_395268;
		nimln(69, "evaltempl.nim");
		nimln(69, "evaltempl.nim");
		{
			nimln(69, "evaltempl.nim");
			if (!(i_395194 < a)) goto LA10;
			if (((TMP5461[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(i_395194) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			arg = (*n).kindU.S6.Sons->data[i_395194];
		}
		goto LA8;
		LA10: ;
		{
			nimln(69, "evaltempl.nim");
			if (((TMP5461[(*(*(*s).Typ).N).Kind/8] &(1<<((*(*(*s).Typ).N).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP5462));
			if ((NU)(i_395194) >= (NU)((*(*(*s).Typ).N).kindU.S6.Sons->Sup.len)) raiseIndexError();
			if (!(((TMP5459[(*(*(*(*s).Typ).N).kindU.S6.Sons->data[i_395194]).Kind/8] &(1<<((*(*(*(*s).Typ).N).kindU.S6.Sons->data[i_395194]).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP5460));
			arg = copytree_192247((*(*(*(*(*s).Typ).N).kindU.S6.Sons->data[i_395194]).kindU.S4.Sym).Ast);
		}
		LA8: ;
		nimln(70, "evaltempl.nim");
		{
			NIM_BOOL LOC15;
			nimln(70, "evaltempl.nim");
			LOC15 = 0;
			nimln(70, "evaltempl.nim");
			LOC15 = (arg == NIM_NIL);
			if (LOC15) goto LA16;
			nimln(70, "evaltempl.nim");
			LOC15 = ((*arg).Kind == ((NU8) 1));
			LA16: ;
			if (!LOC15) goto LA17;
			nimln(71, "evaltempl.nim");
			localerror_168571((*n).Info, ((NU16) 133), ((NimStringDesc*) &TMP5466));
		}
		LA17: ;
		nimln(72, "evaltempl.nim");
		addson_192217(result, arg);
		nimln(1454, "system.nim");
		res_395268 = addInt(res_395268, 1);
	} LA7: ;
	popFrame();
	return result;
}
Ejemplo n.º 5
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;
}
Ejemplo n.º 6
0
N_NIMCALL(void, importforwarded_259633)(tcontext254019* c, tnode191813* n, tintset188047* exceptset) {
	nimfr("importForwarded", "importer.nim")
	nimln(133, "importer.nim");
	{
		nimln(133, "importer.nim");
		if (!n == 0) goto LA3;
		nimln(133, "importer.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(134, "importer.nim");
	switch ((*n).Kind) {
	case ((NU8) 117):
	{
		tnode191813* a_259649;
		NI i_259860;
		NI HEX3Atmp_259862;
		NI LOC6;
		NI res_259864;
		a_259649 = 0;
		i_259860 = 0;
		HEX3Atmp_259862 = 0;
		nimln(1521, "ast.nim");
		nimln(1521, "ast.nim");
		nimln(1521, "ast.nim");
		LOC6 = 0;
		LOC6 = len_192274(n);
		HEX3Atmp_259862 = subInt(LOC6, 1);
		nimln(1458, "system.nim");
		res_259864 = 0;
		nimln(1459, "system.nim");
		while (1) {
			tsym191843* s;
			nimln(1459, "system.nim");
			if (!(res_259864 <= HEX3Atmp_259862)) goto LA7;
			nimln(1458, "system.nim");
			i_259860 = res_259864;
			nimln(1521, "ast.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(i_259860) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			a_259649 = (*n).kindU.S6.Sons->data[i_259860];
			nimln(137, "importer.nim");
			{
				nimln(137, "importer.nim");
				nimln(137, "importer.nim");
				if (!!(((*a_259649).Kind == ((NU8) 3)))) goto LA10;
				nimln(137, "importer.nim");
				failedassertimpl_81621(((NimStringDesc*) &TMP3289));
			}
			LA10: ;
			nimln(138, "importer.nim");
			if (!(((TMP3274[(*a_259649).Kind/8] &(1<<((*a_259649).Kind%8)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3275));
			s = (*a_259649).kindU.S4.Sym;
			nimln(139, "importer.nim");
			{
				nimln(139, "importer.nim");
				if (!((*s).Kind == ((NU8) 6))) goto LA14;
				nimln(140, "importer.nim");
				importallsymbolsexcept_259529(c, s, exceptset);
			}
			goto LA12;
			LA14: ;
			{
				NIM_BOOL LOC17;
				NIM_BOOL LOC19;
				nimln(141, "importer.nim");
				LOC17 = 0;
				nimln(141, "importer.nim");
				LOC17 = empty_189342(exceptset);
				if (LOC17) goto LA18;
				nimln(141, "importer.nim");
				nimln(141, "importer.nim");
				LOC19 = 0;
				LOC19 = contains_188838(exceptset, (*(*s).Name).Sup.Id);
				LOC17 = !(LOC19);
				LA18: ;
				if (!LOC17) goto LA20;
				nimln(142, "importer.nim");
				rawimportsymbol_259235(c, s);
			}
			goto LA12;
			LA20: ;
			LA12: ;
			nimln(1461, "system.nim");
			res_259864 = addInt(res_259864, 1);
		} LA7: ;
	}
	break;
	case ((NU8) 118):
	{
		nimln(144, "importer.nim");
		localerror_168571((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3290));
	}
	break;
	default:
	{
		NI i_259844;
		NI HEX3Atmp_259865;
		NI LOC24;
		NI TMP3291;
		NI res_259867;
		i_259844 = 0;
		HEX3Atmp_259865 = 0;
		nimln(146, "importer.nim");
		nimln(146, "importer.nim");
		nimln(146, "importer.nim");
		LOC24 = 0;
		LOC24 = safelen_192330(n);
		TMP3291 = subInt(LOC24, 1);
		HEX3Atmp_259865 = (NI64)(TMP3291);
		nimln(1458, "system.nim");
		res_259867 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_259867 <= HEX3Atmp_259865)) goto LA25;
			nimln(1458, "system.nim");
			i_259844 = res_259867;
			nimln(147, "importer.nim");
			if (((TMP3276[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) raiseFieldError(((NimStringDesc*) &TMP3277));
			if ((NU)(i_259844) >= (NU)((*n).kindU.S6.Sons->Sup.len)) raiseIndexError();
			importforwarded_259633(c, (*n).kindU.S6.Sons->data[i_259844], exceptset);
			nimln(1461, "system.nim");
			res_259867 = addInt(res_259867, 1);
		} LA25: ;
	}
	break;
	}
	BeforeRet: ;
	popFrame();
}
Ejemplo n.º 7
0
N_NIMCALL(void, importsymbol_259416)(tcontext254019* c, tnode191813* n, tsym191843* frommod) {
	tident170019* ident;
	tsym191843* s;
	nimfr("importSymbol", "importer.nim")
	nimln(96, "importer.nim");
	ident = consideracc_256006(n);
	nimln(97, "importer.nim");
	if (!(((64 &(1<<(((*frommod).Kind)&31)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3285));
	s = strtableget_200084((*frommod).kindU.S3.Tab, ident);
	nimln(98, "importer.nim");
	{
		nimln(98, "importer.nim");
		if (!(s == NIM_NIL)) goto LA3;
		nimln(99, "importer.nim");
		localerror_168571((*n).Info, ((NU16) 61), (*ident).S);
	}
	goto LA1;
	LA3: ;
	{
		nimln(101, "importer.nim");
		{
			nimln(101, "importer.nim");
			if (!((*s).Kind == ((NU8) 23))) goto LA8;
			nimln(101, "importer.nim");
			loadstub_243238(s);
		}
		LA8: ;
		nimln(102, "importer.nim");
		{
			nimln(102, "importer.nim");
			nimln(102, "importer.nim");
			if (!!(((9959296 &(1<<(((*s).Kind)&31)))!=0))) goto LA12;
			nimln(103, "importer.nim");
			internalerror_168591((*n).Info, ((NimStringDesc*) &TMP3286));
		}
		LA12: ;
		nimln(105, "importer.nim");
		switch ((*s).Kind) {
		case ((NU8) 12):
		case ((NU8) 18):
		case ((NU8) 17):
		case ((NU8) 14):
		case ((NU8) 15):
		case ((NU8) 13):
		case ((NU8) 16):
		{
			tidentiter200106 it;
			tsym191843* e;
			memset((void*)&it, 0, sizeof(it));
			nimln(109, "importer.nim");
			if (!(((64 &(1<<(((*frommod).Kind)&31)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3285));
			e = initidentiter_200110(&it, (*frommod).kindU.S3.Tab, (*s).Name);
			nimln(110, "importer.nim");
			while (1) {
				nimln(110, "importer.nim");
				nimln(110, "importer.nim");
				if (!!((e == NIM_NIL))) goto LA15;
				nimln(111, "importer.nim");
				{
					nimln(111, "importer.nim");
					nimln(111, "importer.nim");
					if (!!(((*(*e).Name).Sup.Id == (*(*s).Name).Sup.Id))) goto LA18;
					nimln(111, "importer.nim");
					internalerror_168591((*n).Info, ((NimStringDesc*) &TMP3287));
				}
				LA18: ;
				nimln(112, "importer.nim");
				rawimportsymbol_259235(c, e);
				nimln(113, "importer.nim");
				if (!(((64 &(1<<(((*frommod).Kind)&31)))!=0))) raiseFieldError(((NimStringDesc*) &TMP3285));
				e = nextidentiter_200117(&it, (*frommod).kindU.S3.Tab);
			} LA15: ;
		}
		break;
		default:
		{
			nimln(114, "importer.nim");
			rawimportsymbol_259235(c, s);
		}
		break;
		}
	}
	LA1: ;
	popFrame();
}
Ejemplo n.º 8
0
N_NIMCALL(void, parseline_223177)(ttmplparser223017* p) {
	NI d;
	NI j;
	NI curly;
	NimStringDesc* keyw;
	nimfr("parseLine", "filter_tmpl.nim")
	d = 0;
	j = 0;
	curly = 0;
	keyw = 0;
	nimln(68, "filter_tmpl.nim");
	j = 0;
	nimln(69, "filter_tmpl.nim");
	while (1) {
		nimln(69, "filter_tmpl.nim");
		if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
		if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA1;
		nimln(69, "filter_tmpl.nim");
		j = addInt(j, 1);
	} LA1: ;
	nimln(70, "filter_tmpl.nim");
	{
		NIM_BOOL LOC4;
		nimln(70, "filter_tmpl.nim");
		LOC4 = 0;
		nimln(70, "filter_tmpl.nim");
		if ((NU)(0) > (NU)((*p).X->Sup.len)) raiseIndexError();
		LOC4 = ((NU8)((*p).X->data[0]) == (NU8)((*p).Nimdirective));
		if (!(LOC4)) goto LA5;
		nimln(70, "filter_tmpl.nim");
		if ((NU)(1) > (NU)((*p).X->Sup.len)) raiseIndexError();
		LOC4 = ((NU8)((*p).X->data[1]) == (NU8)(33));
		LA5: ;
		if (!LOC4) goto LA6;
		nimln(71, "filter_tmpl.nim");
		newline_223040(p);
	}
	goto LA2;
	LA6: ;
	{
		NIM_BOOL LOC13;
		NU8 LOC15;
		nimln(72, "filter_tmpl.nim");
		if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
		if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Nimdirective))) goto LA9;
		nimln(73, "filter_tmpl.nim");
		newline_223040(p);
		nimln(74, "filter_tmpl.nim");
		j = addInt(j, 1);
		nimln(75, "filter_tmpl.nim");
		while (1) {
			nimln(75, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			if (!((NU8)((*p).X->data[j]) == (NU8)(32))) goto LA11;
			nimln(75, "filter_tmpl.nim");
			j = addInt(j, 1);
		} LA11: ;
		nimln(76, "filter_tmpl.nim");
		d = j;
		nimln(77, "filter_tmpl.nim");
		keyw = copyString(((NimStringDesc*) &TMP2669));
		nimln(78, "filter_tmpl.nim");
		while (1) {
			nimln(78, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			if (!(((NU8)((*p).X->data[j])) >= ((NU8)(97)) && ((NU8)((*p).X->data[j])) <= ((NU8)(122)) || ((NU8)((*p).X->data[j])) >= ((NU8)(65)) && ((NU8)((*p).X->data[j])) <= ((NU8)(90)) || ((NU8)((*p).X->data[j])) >= ((NU8)(48)) && ((NU8)((*p).X->data[j])) <= ((NU8)(57)) || ((NU8)((*p).X->data[j])) >= ((NU8)(128)) && ((NU8)((*p).X->data[j])) <= ((NU8)(255)) || ((NU8)((*p).X->data[j])) == ((NU8)(46)) || ((NU8)((*p).X->data[j])) == ((NU8)(95)))) goto LA12;
			nimln(79, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			keyw = addChar(keyw, (*p).X->data[j]);
			nimln(80, "filter_tmpl.nim");
			j = addInt(j, 1);
		} LA12: ;
		nimln(82, "filter_tmpl.nim");
		scanpar_223047(p, j);
		nimln(83, "filter_tmpl.nim");
		nimln(83, "filter_tmpl.nim");
		LOC13 = 0;
		nimln(83, "filter_tmpl.nim");
		LOC13 = withinexpr_223168(&(*p));
		if (LOC13) goto LA14;
		nimln(83, "filter_tmpl.nim");
		LOC13 = endswithopr_179646((*p).X);
		LA14: ;
		(*p).Pendingexprline = LOC13;
		nimln(84, "filter_tmpl.nim");
		nimln(84, "filter_tmpl.nim");
		LOC15 = 0;
		LOC15 = whichkeyword_174367(keyw);
		switch (LOC15) {
		case ((NU8) 20):
		{
			NimStringDesc* LOC22;
			nimln(86, "filter_tmpl.nim");
			{
				nimln(86, "filter_tmpl.nim");
				if (!(2 <= (*p).Indent)) goto LA19;
				nimln(87, "filter_tmpl.nim");
				(*p).Indent = subInt((*p).Indent, 2);
			}
			goto LA17;
			LA19: ;
			{
				nimln(89, "filter_tmpl.nim");
				(*p).Info.Col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
				nimln(90, "filter_tmpl.nim");
				localerror_168571((*p).Info, ((NU16) 163), ((NimStringDesc*) &TMP2670));
			}
			LA17: ;
			nimln(91, "filter_tmpl.nim");
			nimln(91, "filter_tmpl.nim");
			LOC22 = 0;
			LOC22 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_179258((*p).Outp, LOC22);
			nimln(92, "filter_tmpl.nim");
			llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2671));
		}
		break;
		case ((NU8) 28):
		case ((NU8) 63):
		case ((NU8) 58):
		case ((NU8) 64):
		case ((NU8) 25):
		case ((NU8) 7):
		case ((NU8) 9):
		case ((NU8) 49):
		case ((NU8) 35):
		case ((NU8) 13):
		case ((NU8) 38):
		case ((NU8) 57):
		case ((NU8) 39):
		{
			NimStringDesc* LOC24;
			NimStringDesc* LOC25;
			nimln(95, "filter_tmpl.nim");
			nimln(95, "filter_tmpl.nim");
			LOC24 = 0;
			LOC24 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_179258((*p).Outp, LOC24);
			nimln(96, "filter_tmpl.nim");
			nimln(96, "filter_tmpl.nim");
			LOC25 = 0;
			LOC25 = copyStr((*p).X, d);
			llstreamwrite_179258((*p).Outp, LOC25);
			nimln(97, "filter_tmpl.nim");
			(*p).Indent = addInt((*p).Indent, 2);
		}
		break;
		case ((NU8) 18):
		case ((NU8) 46):
		case ((NU8) 19):
		case ((NU8) 22):
		case ((NU8) 24):
		{
			NI TMP2672;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			nimln(99, "filter_tmpl.nim");
			nimln(99, "filter_tmpl.nim");
			nimln(99, "filter_tmpl.nim");
			TMP2672 = subInt((*p).Indent, 2);
			LOC27 = 0;
			LOC27 = nsuRepeatChar((NI64)(TMP2672), 32);
			llstreamwrite_179258((*p).Outp, LOC27);
			nimln(100, "filter_tmpl.nim");
			nimln(100, "filter_tmpl.nim");
			LOC28 = 0;
			LOC28 = copyStr((*p).X, d);
			llstreamwrite_179258((*p).Outp, LOC28);
		}
		break;
		case ((NU8) 37):
		case ((NU8) 62):
		case ((NU8) 11):
		case ((NU8) 60):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			nimln(102, "filter_tmpl.nim");
			nimln(102, "filter_tmpl.nim");
			LOC30 = 0;
			LOC30 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_179258((*p).Outp, LOC30);
			nimln(103, "filter_tmpl.nim");
			nimln(103, "filter_tmpl.nim");
			LOC31 = 0;
			LOC31 = copyStr((*p).X, d);
			llstreamwrite_179258((*p).Outp, LOC31);
			nimln(104, "filter_tmpl.nim");
			{
				NIM_BOOL LOC34;
				nimln(104, "filter_tmpl.nim");
				nimln(104, "filter_tmpl.nim");
				LOC34 = 0;
				LOC34 = contains_91258((*p).X, TMP2673);
				if (!!(LOC34)) goto LA35;
				nimln(106, "filter_tmpl.nim");
				(*p).Indent = addInt((*p).Indent, 2);
			}
			LA35: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC38;
			NimStringDesc* LOC39;
			nimln(108, "filter_tmpl.nim");
			nimln(108, "filter_tmpl.nim");
			LOC38 = 0;
			LOC38 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_179258((*p).Outp, LOC38);
			nimln(109, "filter_tmpl.nim");
			nimln(109, "filter_tmpl.nim");
			LOC39 = 0;
			LOC39 = copyStr((*p).X, d);
			llstreamwrite_179258((*p).Outp, LOC39);
		}
		break;
		}
		nimln(110, "filter_tmpl.nim");
		(*p).State = ((NU8) 0);
	}
	goto LA2;
	LA9: ;
	{
		nimln(114, "filter_tmpl.nim");
		(*p).Par = 0;
		nimln(115, "filter_tmpl.nim");
		(*p).Curly = 0;
		nimln(116, "filter_tmpl.nim");
		(*p).Bracket = 0;
		nimln(117, "filter_tmpl.nim");
		j = 0;
		nimln(118, "filter_tmpl.nim");
		switch ((*p).State) {
		case ((NU8) 1):
		{
			NI TMP2674;
			NimStringDesc* LOC42;
			nimln(121, "filter_tmpl.nim");
			llstreamwrite_179258((*p).Outp, (*p).Conc);
			nimln(122, "filter_tmpl.nim");
			llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2668));
			nimln(123, "filter_tmpl.nim");
			nimln(123, "filter_tmpl.nim");
			nimln(123, "filter_tmpl.nim");
			TMP2674 = addInt((*p).Indent, 2);
			LOC42 = 0;
			LOC42 = nsuRepeatChar((NI64)(TMP2674), 32);
			llstreamwrite_179258((*p).Outp, LOC42);
			nimln(124, "filter_tmpl.nim");
			llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2675));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC44;
			nimln(126, "filter_tmpl.nim");
			newline_223040(p);
			nimln(127, "filter_tmpl.nim");
			nimln(127, "filter_tmpl.nim");
			LOC44 = 0;
			LOC44 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_179258((*p).Outp, LOC44);
			nimln(128, "filter_tmpl.nim");
			llstreamwrite_179258((*p).Outp, (*p).Emit);
			nimln(129, "filter_tmpl.nim");
			llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2676));
			nimln(130, "filter_tmpl.nim");
			(*p).Emitpar = addInt((*p).Emitpar, 1);
		}
		break;
		}
		nimln(131, "filter_tmpl.nim");
		(*p).State = ((NU8) 1);
		nimln(132, "filter_tmpl.nim");
		while (1) {
			nimln(133, "filter_tmpl.nim");
			if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
			switch (((NU8)((*p).X->data[j]))) {
			case 0:
			{
				nimln(135, "filter_tmpl.nim");
				goto LA45;
			}
			break;
			case 1 ... 31:
			case 128 ... 255:
			{
				NimStringDesc* LOC48;
				nimln(137, "filter_tmpl.nim");
				llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2677));
				nimln(138, "filter_tmpl.nim");
				nimln(138, "filter_tmpl.nim");
				nimln(138, "filter_tmpl.nim");
				if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
				LOC48 = 0;
				LOC48 = nsuToHex(((NI64) (((NU8)((*p).X->data[j])))), 2);
				llstreamwrite_179258((*p).Outp, LOC48);
				nimln(139, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			case 92:
			{
				nimln(141, "filter_tmpl.nim");
				llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2678));
				nimln(142, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			case 39:
			{
				nimln(144, "filter_tmpl.nim");
				llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2679));
				nimln(145, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			case 34:
			{
				nimln(147, "filter_tmpl.nim");
				llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2680));
				nimln(148, "filter_tmpl.nim");
				j = addInt(j, 1);
			}
			break;
			default:
			{
				nimln(150, "filter_tmpl.nim");
				{
					nimln(150, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA55;
					nimln(152, "filter_tmpl.nim");
					j = addInt(j, 1);
					nimln(153, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					switch (((NU8)((*p).X->data[j]))) {
					case 123:
					{
						nimln(155, "filter_tmpl.nim");
						(*p).Info.Col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
						nimln(156, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 34);
						nimln(157, "filter_tmpl.nim");
						llstreamwrite_179258((*p).Outp, (*p).Conc);
						nimln(158, "filter_tmpl.nim");
						llstreamwrite_179258((*p).Outp, (*p).Tostr);
						nimln(159, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 40);
						nimln(160, "filter_tmpl.nim");
						j = addInt(j, 1);
						nimln(161, "filter_tmpl.nim");
						curly = 0;
						nimln(162, "filter_tmpl.nim");
						while (1) {
							nimln(163, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							switch (((NU8)((*p).X->data[j]))) {
							case 0:
							{
								nimln(165, "filter_tmpl.nim");
								localerror_168571((*p).Info, ((NU16) 188), ((NimStringDesc*) &TMP2681));
								nimln(166, "filter_tmpl.nim");
								goto LA58;
							}
							break;
							case 123:
							{
								nimln(168, "filter_tmpl.nim");
								j = addInt(j, 1);
								nimln(169, "filter_tmpl.nim");
								curly = addInt(curly, 1);
								nimln(170, "filter_tmpl.nim");
								llstreamwrite_179263((*p).Outp, 123);
							}
							break;
							case 125:
							{
								nimln(172, "filter_tmpl.nim");
								j = addInt(j, 1);
								nimln(173, "filter_tmpl.nim");
								{
									nimln(173, "filter_tmpl.nim");
									if (!(curly == 0)) goto LA64;
									nimln(173, "filter_tmpl.nim");
									goto LA58;
								}
								LA64: ;
								nimln(174, "filter_tmpl.nim");
								{
									nimln(174, "filter_tmpl.nim");
									if (!(0 < curly)) goto LA68;
									nimln(174, "filter_tmpl.nim");
									curly = subInt(curly, 1);
								}
								LA68: ;
								nimln(175, "filter_tmpl.nim");
								llstreamwrite_179263((*p).Outp, 125);
							}
							break;
							default:
							{
								nimln(177, "filter_tmpl.nim");
								if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
								llstreamwrite_179263((*p).Outp, (*p).X->data[j]);
								nimln(178, "filter_tmpl.nim");
								j = addInt(j, 1);
							}
							break;
							}
						} LA58: ;
						nimln(179, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 41);
						nimln(180, "filter_tmpl.nim");
						llstreamwrite_179258((*p).Outp, (*p).Conc);
						nimln(181, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 34);
					}
					break;
					case 97 ... 122:
					case 65 ... 90:
					case 128 ... 255:
					{
						nimln(183, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 34);
						nimln(184, "filter_tmpl.nim");
						llstreamwrite_179258((*p).Outp, (*p).Conc);
						nimln(185, "filter_tmpl.nim");
						llstreamwrite_179258((*p).Outp, (*p).Tostr);
						nimln(186, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 40);
						nimln(187, "filter_tmpl.nim");
						while (1) {
							nimln(187, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							if (!(((NU8)((*p).X->data[j])) >= ((NU8)(97)) && ((NU8)((*p).X->data[j])) <= ((NU8)(122)) || ((NU8)((*p).X->data[j])) >= ((NU8)(65)) && ((NU8)((*p).X->data[j])) <= ((NU8)(90)) || ((NU8)((*p).X->data[j])) >= ((NU8)(48)) && ((NU8)((*p).X->data[j])) <= ((NU8)(57)) || ((NU8)((*p).X->data[j])) >= ((NU8)(128)) && ((NU8)((*p).X->data[j])) <= ((NU8)(255)) || ((NU8)((*p).X->data[j])) == ((NU8)(46)) || ((NU8)((*p).X->data[j])) == ((NU8)(95)))) goto LA72;
							nimln(188, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							llstreamwrite_179263((*p).Outp, (*p).X->data[j]);
							nimln(189, "filter_tmpl.nim");
							j = addInt(j, 1);
						} LA72: ;
						nimln(190, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 41);
						nimln(191, "filter_tmpl.nim");
						llstreamwrite_179258((*p).Outp, (*p).Conc);
						nimln(192, "filter_tmpl.nim");
						llstreamwrite_179263((*p).Outp, 34);
					}
					break;
					default:
					{
						nimln(194, "filter_tmpl.nim");
						{
							nimln(194, "filter_tmpl.nim");
							if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
							if (!((NU8)((*p).X->data[j]) == (NU8)((*p).Subschar))) goto LA76;
							nimln(195, "filter_tmpl.nim");
							llstreamwrite_179263((*p).Outp, (*p).Subschar);
							nimln(196, "filter_tmpl.nim");
							j = addInt(j, 1);
						}
						goto LA74;
						LA76: ;
						{
							nimln(198, "filter_tmpl.nim");
							(*p).Info.Col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
							nimln(199, "filter_tmpl.nim");
							localerror_168571((*p).Info, ((NU16) 167), ((NimStringDesc*) &TMP2682));
						}
						LA74: ;
					}
					break;
					}
				}
				goto LA53;
				LA55: ;
				{
					nimln(201, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					llstreamwrite_179263((*p).Outp, (*p).X->data[j]);
					nimln(202, "filter_tmpl.nim");
					j = addInt(j, 1);
				}
				LA53: ;
			}
			break;
			}
		} LA45: ;
		nimln(203, "filter_tmpl.nim");
		llstreamwrite_179258((*p).Outp, ((NimStringDesc*) &TMP2683));
	}
	LA2: ;
	popFrame();
}