Ejemplo n.º 1
0
N_NIMCALL(void, encodestr_199031)(NimStringDesc* s, NimStringDesc** result) {
	NI i_199048;
	NI HEX3Atmp_199057;
	NI TMP2101;
	NI res_199059;
	nimfr("encodeStr", "rodutils.nim")
	i_199048 = 0;
	HEX3Atmp_199057 = 0;
	nimln(29, "rodutils.nim");
	nimln(29, "rodutils.nim");
	nimln(29, "rodutils.nim");
	TMP2101 = subInt(s->Sup.len, 1);
	HEX3Atmp_199057 = (NI32)(TMP2101);
	nimln(1451, "system.nim");
	res_199059 = 0;
	nimln(1452, "system.nim");
	while (1) {
		nimln(1452, "system.nim");
		if (!(res_199059 <= HEX3Atmp_199057)) goto LA1;
		nimln(1451, "system.nim");
		i_199048 = res_199059;
		nimln(30, "rodutils.nim");
		if ((NU)(i_199048) > (NU)(s->Sup.len)) raiseIndexError();
		switch (((NU8)(s->data[i_199048]))) {
		case 97 ... 122:
		case 65 ... 90:
		case 48 ... 57:
		case 95:
		{
			nimln(31, "rodutils.nim");
			if ((NU)(i_199048) > (NU)(s->Sup.len)) raiseIndexError();
			(*result) = addChar((*result), s->data[i_199048]);
		}
		break;
		default:
		{
			NimStringDesc* LOC4;
			NimStringDesc* LOC5;
			nimln(32, "rodutils.nim");
			nimln(32, "rodutils.nim");
			LOC4 = 0;
			nimln(32, "rodutils.nim");
			nimln(32, "rodutils.nim");
			if ((NU)(i_199048) > (NU)(s->Sup.len)) raiseIndexError();
			LOC5 = 0;
			LOC5 = nsuToHex(((NI64) (((NU8)(s->data[i_199048])))), 2);
			LOC4 = rawNewString(LOC5->Sup.len + 1);
appendChar(LOC4, 92);
appendString(LOC4, LOC5);
			(*result) = resizeString((*result), LOC4->Sup.len + 0);
appendString((*result), LOC4);
		}
		break;
		}
		nimln(1454, "system.nim");
		res_199059 = addInt(res_199059, 1);
	} LA1: ;
	popFrame();
}
Ejemplo n.º 2
0
N_NIMCALL(TY47008*, Makellvmstring_155013)(NimStringDesc* S_155015) {
TY47008* Result_155206;
NimStringDesc* Res_155208;
NI I_155219;
NI HEX3Atmp_155229;
NI Res_155231;
TY47008* LOC5;
NimStringDesc* LOC6;
TY47008* LOC7;
Result_155206 = 0;
Res_155208 = 0;
Result_155206 = NIM_NIL;
Res_155208 = copyString(((NimStringDesc*) &TMP192302));
I_155219 = 0;
HEX3Atmp_155229 = 0;
HEX3Atmp_155229 = (NI64)((NI64)(S_155015->Sup.len + 0) - 1);
Res_155231 = 0;
Res_155231 = 0;
while (1) {
if (!(Res_155231 <= HEX3Atmp_155229)) goto LA1;
I_155219 = Res_155231;
if (!((NI64)((NI64)((NI64)(I_155219 - 0) + 1) % 64) == 0)) goto LA3;
LOC5 = 0;
LOC5 = Torope_47046(Res_155208);
App_47031(&Result_155206, LOC5);
Res_155208 = setLengthStr(Res_155208, 0);
LA3: ;
switch (((NU8)(S_155015->data[I_155219]))) {
case 0 ... 31:
case 128 ... 255:
case 34:
case 92:
Res_155208 = addChar(Res_155208, 92);
LOC6 = 0;
LOC6 = nsuToHex(((NI64) (((NU8)(S_155015->data[I_155219])))), 2);
Res_155208 = resizeString(Res_155208, LOC6->Sup.len + 0);
appendString(Res_155208, LOC6);
break;
default:
Res_155208 = addChar(Res_155208, S_155015->data[I_155219]);
break;
}
Res_155231 += 1;
} LA1: ;
Res_155208 = resizeString(Res_155208, 4);
appendString(Res_155208, ((NimStringDesc*) &TMP192303));
LOC7 = 0;
LOC7 = Torope_47046(Res_155208);
App_47031(&Result_155206, LOC7);
return Result_155206;
}
Ejemplo n.º 3
0
N_NIMCALL(void, parseline_238110)(Ttmplparser238011* p) {
	NI d;
	NI j;
	NI curly;
	NimStringDesc* keyw;
	d = 0;
	j = 0;
	curly = 0;
	keyw = 0;
	j = ((NI) 0);
	{
		while (1) {
			if (!((NU8)((*p).x->data[j]) == (NU8)(32))) goto LA2;
			j += ((NI) 1);
		} LA2: ;
	}
	{
		NIM_BOOL LOC5;
		LOC5 = 0;
		LOC5 = ((NU8)((*p).x->data[((NI) 0)]) == (NU8)((*p).nimdirective));
		if (!(LOC5)) goto LA6;
		LOC5 = (((NU8)((*p).x->data[((NI) 1)])) == ((NU8)(63)) || ((NU8)((*p).x->data[((NI) 1)])) == ((NU8)(33)));
		LA6: ;
		if (!LOC5) goto LA7;
		newline_238032(p);
	}
	goto LA3;
	LA7: ;
	{
		NIM_BOOL LOC16;
		NU16 LOC18;
		if (!((NU8)((*p).x->data[j]) == (NU8)((*p).nimdirective))) goto LA10;
		newline_238032(p);
		j += ((NI) 1);
		{
			while (1) {
				if (!((NU8)((*p).x->data[j]) == (NU8)(32))) goto LA13;
				j += ((NI) 1);
			} LA13: ;
		}
		d = j;
		keyw = copyString(((NimStringDesc*) &TMP1522));
		{
			while (1) {
				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 LA15;
				keyw = addChar(keyw, (*p).x->data[j]);
				j += ((NI) 1);
			} LA15: ;
		}
		scanpar_238036(p, j);
		LOC16 = 0;
		LOC16 = withinexpr_238106((&(*p)));
		if (LOC16) goto LA17;
		LOC16 = endswithopr_203432((*p).x);
		LA17: ;
		(*p).pendingexprline = LOC16;
		LOC18 = 0;
		LOC18 = whichkeyword_197366(keyw);
		switch (LOC18) {
		case ((NU16) 22):
		{
			NimStringDesc* LOC25;
			{
				if (!(((NI) 2) <= (*p).indent)) goto LA22;
				(*p).indent -= ((NI) 2);
			}
			goto LA20;
			LA22: ;
			{
				(*p).info.col = ((NI16) (j));
				localerror_188080((*p).info, ((NU16) 167), ((NimStringDesc*) &TMP1533));
			}
			LA20: ;
			LOC25 = 0;
			LOC25 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC25);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1534));
		}
		break;
		case ((NU16) 31):
		case ((NU16) 65):
		case ((NU16) 60):
		case ((NU16) 66):
		case ((NU16) 27):
		case ((NU16) 7):
		case ((NU16) 9):
		case ((NU16) 51):
		case ((NU16) 38):
		case ((NU16) 14):
		case ((NU16) 40):
		case ((NU16) 59):
		case ((NU16) 41):
		{
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			LOC27 = 0;
			LOC27 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC27);
			LOC28 = 0;
			LOC28 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC28);
			(*p).indent += ((NI) 2);
		}
		break;
		case ((NU16) 20):
		case ((NU16) 48):
		case ((NU16) 21):
		case ((NU16) 24):
		case ((NU16) 26):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			LOC30 = 0;
			LOC30 = nsuRepeatChar(32, ((NI) ((NI)((*p).indent - ((NI) 2)))));
			llstreamwrite_203593((*p).outp, LOC30);
			LOC31 = 0;
			LOC31 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC31);
		}
		break;
		case ((NU16) 39):
		case ((NU16) 64):
		case ((NU16) 12):
		case ((NU16) 62):
		{
			NimStringDesc* LOC33;
			NimStringDesc* LOC34;
			LOC33 = 0;
			LOC33 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC33);
			LOC34 = 0;
			LOC34 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC34);
			{
				NIM_BOOL LOC37;
				LOC37 = 0;
				LOC37 = contains_101033((*p).x, TMP1535);
				if (!!(LOC37)) goto LA38;
				(*p).indent += ((NI) 2);
			}
			LA38: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC41;
			NimStringDesc* LOC42;
			LOC41 = 0;
			LOC41 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC41);
			LOC42 = 0;
			LOC42 = copyStr((*p).x, d);
			llstreamwrite_203593((*p).outp, LOC42);
		}
		break;
		}
		(*p).state = ((NU8) 0);
	}
	goto LA3;
	LA10: ;
	{
		(*p).par = ((NI) 0);
		(*p).curly = ((NI) 0);
		(*p).bracket = ((NI) 0);
		j = ((NI) 0);
		switch ((*p).state) {
		case ((NU8) 1):
		{
			NimStringDesc* LOC45;
			llstreamwrite_203593((*p).outp, (*p).conc);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1531));
			LOC45 = 0;
			LOC45 = nsuRepeatChar(32, ((NI) ((NI)((*p).indent + ((NI) 2)))));
			llstreamwrite_203593((*p).outp, LOC45);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1536));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC47;
			newline_238032(p);
			LOC47 = 0;
			LOC47 = nsuRepeatChar(32, ((NI) ((*p).indent)));
			llstreamwrite_203593((*p).outp, LOC47);
			llstreamwrite_203593((*p).outp, (*p).emit);
			llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1537));
			(*p).emitpar += ((NI) 1);
		}
		break;
		}
		(*p).state = ((NU8) 1);
		{
			while (1) {
				switch (((NU8)((*p).x->data[j]))) {
				case 0:
				{
					goto LA48;
				}
				break;
				case 1 ... 31:
				case 128 ... 255:
				{
					NimStringDesc* LOC52;
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1538));
					LOC52 = 0;
					LOC52 = nsuToHex(((NI64) (((NU8)((*p).x->data[j])))), ((NI) 2));
					llstreamwrite_203593((*p).outp, LOC52);
					j += ((NI) 1);
				}
				break;
				case 92:
				{
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1539));
					j += ((NI) 1);
				}
				break;
				case 39:
				{
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1540));
					j += ((NI) 1);
				}
				break;
				case 34:
				{
					llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1541));
					j += ((NI) 1);
				}
				break;
				default:
				{
					{
						if (!((NU8)((*p).x->data[j]) == (NU8)((*p).subschar))) goto LA59;
						j += ((NI) 1);
						switch (((NU8)((*p).x->data[j]))) {
						case 123:
						{
							(*p).info.col = ((NI16) (j));
							llstreamwrite_203612((*p).outp, 34);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203593((*p).outp, (*p).tostr);
							llstreamwrite_203612((*p).outp, 40);
							j += ((NI) 1);
							curly = ((NI) 0);
							{
								while (1) {
									switch (((NU8)((*p).x->data[j]))) {
									case 0:
									{
										localerror_188080((*p).info, ((NU16) 193), ((NimStringDesc*) &TMP1542));
										goto LA62;
									}
									break;
									case 123:
									{
										j += ((NI) 1);
										curly += ((NI) 1);
										llstreamwrite_203612((*p).outp, 123);
									}
									break;
									case 125:
									{
										j += ((NI) 1);
										{
											if (!(curly == ((NI) 0))) goto LA69;
											goto LA62;
										}
										LA69: ;
										{
											if (!(((NI) 0) < curly)) goto LA73;
											curly -= ((NI) 1);
										}
										LA73: ;
										llstreamwrite_203612((*p).outp, 125);
									}
									break;
									default:
									{
										llstreamwrite_203612((*p).outp, (*p).x->data[j]);
										j += ((NI) 1);
									}
									break;
									}
								}
							} LA62: ;
							llstreamwrite_203612((*p).outp, 41);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203612((*p).outp, 34);
						}
						break;
						case 97 ... 122:
						case 65 ... 90:
						case 128 ... 255:
						{
							llstreamwrite_203612((*p).outp, 34);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203593((*p).outp, (*p).tostr);
							llstreamwrite_203612((*p).outp, 40);
							{
								while (1) {
									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 LA78;
									llstreamwrite_203612((*p).outp, (*p).x->data[j]);
									j += ((NI) 1);
								} LA78: ;
							}
							llstreamwrite_203612((*p).outp, 41);
							llstreamwrite_203593((*p).outp, (*p).conc);
							llstreamwrite_203612((*p).outp, 34);
						}
						break;
						default:
						{
							{
								if (!((NU8)((*p).x->data[j]) == (NU8)((*p).subschar))) goto LA82;
								llstreamwrite_203612((*p).outp, (*p).subschar);
								j += ((NI) 1);
							}
							goto LA80;
							LA82: ;
							{
								(*p).info.col = ((NI16) (j));
								localerror_188080((*p).info, ((NU16) 171), ((NimStringDesc*) &TMP1530));
							}
							LA80: ;
						}
						break;
						}
					}
					goto LA57;
					LA59: ;
					{
						llstreamwrite_203612((*p).outp, (*p).x->data[j]);
						j += ((NI) 1);
					}
					LA57: ;
				}
				break;
				}
			}
		} LA48: ;
		llstreamwrite_203593((*p).outp, ((NimStringDesc*) &TMP1543));
	}
	LA3: ;
}
Ejemplo n.º 4
0
N_NIMCALL(trope144007*, makellvmstring_464684)(NimStringDesc* s) {
    trope144007* result;
    NimStringDesc* res;
    NI i_464702;
    NI HEX3Atmp_464714;
    NI TMP6200;
    NI res_464716;
    trope144007* LOC10;
    nimfr("makeLLVMString", "ccgutils.nim")
    result = 0;
    nimln(166, "ccgutils.nim");
    result = NIM_NIL;
    nimln(167, "ccgutils.nim");
    res = copyString(((NimStringDesc*) &TMP6199));
    i_464702 = 0;
    HEX3Atmp_464714 = 0;
    nimln(168, "ccgutils.nim");
    nimln(168, "ccgutils.nim");
    nimln(168, "ccgutils.nim");
    TMP6200 = subInt(s->Sup.len, 1);
    HEX3Atmp_464714 = (NI64)(TMP6200);
    nimln(1450, "system.nim");
    res_464716 = 0;
    nimln(1451, "system.nim");
    while (1) {
        nimln(1451, "system.nim");
        if (!(res_464716 <= HEX3Atmp_464714)) goto LA1;
        nimln(1450, "system.nim");
        i_464702 = res_464716;
        nimln(169, "ccgutils.nim");
        {
            NI TMP6201;
            NI TMP6202;
            trope144007* LOC6;
            nimln(169, "ccgutils.nim");
            nimln(169, "ccgutils.nim");
            nimln(169, "ccgutils.nim");
            TMP6201 = addInt(i_464702, 1);
            TMP6202 = modInt((NI64)(TMP6201), 64);
            if (!(((NI) ((NI64)(TMP6202))) == 0)) goto LA4;
            nimln(170, "ccgutils.nim");
            nimln(170, "ccgutils.nim");
            LOC6 = 0;
            LOC6 = torope_144058(res);
            app_144040(&result, LOC6);
            nimln(171, "ccgutils.nim");
            res = setLengthStr(res, 0);
        }
LA4:
        ;
        nimln(172, "ccgutils.nim");
        if ((NU)(i_464702) > (NU)(s->Sup.len)) raiseIndexError();
        switch (((NU8)(s->data[i_464702]))) {
        case 0 ... 31:
        case 128 ... 255:
        case 34:
        case 92:
        {
            NimStringDesc* LOC8;
            nimln(174, "ccgutils.nim");
            res = addChar(res, 92);
            nimln(175, "ccgutils.nim");
            nimln(175, "ccgutils.nim");
            nimln(175, "ccgutils.nim");
            if ((NU)(i_464702) > (NU)(s->Sup.len)) raiseIndexError();
            LOC8 = 0;
            LOC8 = nsuToHex(((NI64) (((NU8)(s->data[i_464702])))), 2);
            res = resizeString(res, LOC8->Sup.len + 0);
            appendString(res, LOC8);
        }
        break;
        default:
        {
            nimln(176, "ccgutils.nim");
            if ((NU)(i_464702) > (NU)(s->Sup.len)) raiseIndexError();
            res = addChar(res, s->data[i_464702]);
        }
        break;
        }
        nimln(1453, "system.nim");
        res_464716 = addInt(res_464716, 1);
    }
LA1:
    ;
    nimln(177, "ccgutils.nim");
    res = resizeString(res, 4);
    appendString(res, ((NimStringDesc*) &TMP6203));
    nimln(178, "ccgutils.nim");
    nimln(178, "ccgutils.nim");
    LOC10 = 0;
    LOC10 = torope_144058(res);
    app_144040(&result, LOC10);
    popFrame();
    return result;
}
Ejemplo n.º 5
0
N_NIMCALL(void, Parseline_91144)(TY91009* P_91147) {
NI D_91148;
NI J_91149;
NI Curly_91150;
NimStringDesc* Keyw_91151;
NIM_BOOL LOC3;
NIM_BOOL LOC11;
NU8 LOC13;
NimStringDesc* LOC17;
NimStringDesc* LOC18;
NimStringDesc* LOC19;
NimStringDesc* LOC20;
NimStringDesc* LOC21;
NimStringDesc* LOC22;
NimStringDesc* LOC23;
NimStringDesc* LOC24;
NimStringDesc* LOC25;
NimStringDesc* LOC27;
D_91148 = 0;
J_91149 = 0;
Curly_91150 = 0;
Keyw_91151 = 0;
J_91149 = 0;
while (1) {
if (!((NU8)((*P_91147).X->data[J_91149]) == (NU8)(32))) goto LA1;
J_91149 += 1;
} LA1: ;
LOC3 = ((NU8)((*P_91147).X->data[0]) == (NU8)((*P_91147).Nimdirective));
if (!(LOC3)) goto LA4;
LOC3 = ((NU8)((*P_91147).X->data[1]) == (NU8)(33));
LA4: ;
if (!LOC3) goto LA5;
Newline_91030(P_91147);
goto LA2;
LA5: ;
if (!((NU8)((*P_91147).X->data[J_91149]) == (NU8)((*P_91147).Nimdirective))) goto LA7;
Newline_91030(P_91147);
J_91149 += 1;
while (1) {
if (!((NU8)((*P_91147).X->data[J_91149]) == (NU8)(32))) goto LA9;
J_91149 += 1;
} LA9: ;
D_91148 = J_91149;
Keyw_91151 = copyString(((NimStringDesc*) &TMP195831));
while (1) {
if (!(((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(97)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(122)) || ((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(65)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(90)) || ((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(48)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(57)) || ((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(128)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(255)) || ((NU8)((*P_91147).X->data[J_91149])) == ((NU8)(46)) || ((NU8)((*P_91147).X->data[J_91149])) == ((NU8)(95)))) goto LA10;
Keyw_91151 = addChar(Keyw_91151, (*P_91147).X->data[J_91149]);
J_91149 += 1;
} LA10: ;
Scanpar_91038(P_91147, J_91149);
LOC11 = Withinexpr_91128(&(*P_91147));
if (LOC11) goto LA12;
LOC11 = Endswithopr_75443((*P_91147).X);
LA12: ;
(*P_91147).Pendingexprline = LOC11;
LOC13 = Whichkeyword_72482(Keyw_91151);
switch (LOC13) {
case ((NU8) 19):
if (!(2 <= (*P_91147).Indent)) goto LA15;
(*P_91147).Indent -= 2;
goto LA14;
LA15: ;
(*P_91147).Info.Col = ((NI16) (J_91149));
Localerror_48144((*P_91147).Info, ((NU8) 159), ((NimStringDesc*) &TMP195842));
LA14: ;
LOC17 = 0;
LOC17 = nsuRepeatChar((*P_91147).Indent, 32);
Llstreamwrite_75246((*P_91147).Outp, LOC17);
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195843));
break;
case ((NU8) 26):
case ((NU8) 58):
case ((NU8) 54):
case ((NU8) 59):
case ((NU8) 23):
case ((NU8) 7):
case ((NU8) 9):
case ((NU8) 46):
case ((NU8) 33):
case ((NU8) 13):
case ((NU8) 36):
case ((NU8) 53):
case ((NU8) 37):
LOC18 = 0;
LOC18 = nsuRepeatChar((*P_91147).Indent, 32);
Llstreamwrite_75246((*P_91147).Outp, LOC18);
LOC19 = 0;
LOC19 = copyStr((*P_91147).X, D_91148);
Llstreamwrite_75246((*P_91147).Outp, LOC19);
(*P_91147).Indent += 2;
break;
case ((NU8) 17):
case ((NU8) 43):
case ((NU8) 18):
case ((NU8) 21):
case ((NU8) 22):
LOC20 = 0;
LOC20 = nsuRepeatChar((NI32)((*P_91147).Indent - 2), 32);
Llstreamwrite_75246((*P_91147).Outp, LOC20);
LOC21 = 0;
LOC21 = copyStr((*P_91147).X, D_91148);
Llstreamwrite_75246((*P_91147).Outp, LOC21);
break;
default:
LOC22 = 0;
LOC22 = nsuRepeatChar((*P_91147).Indent, 32);
Llstreamwrite_75246((*P_91147).Outp, LOC22);
LOC23 = 0;
LOC23 = copyStr((*P_91147).X, D_91148);
Llstreamwrite_75246((*P_91147).Outp, LOC23);
break;
}
(*P_91147).State = ((NU8) 0);
goto LA2;
LA7: ;
(*P_91147).Par = 0;
(*P_91147).Curly = 0;
(*P_91147).Bracket = 0;
J_91149 = 0;
switch ((*P_91147).State) {
case ((NU8) 1):
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Conc);
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195840));
LOC24 = 0;
LOC24 = nsuRepeatChar((NI32)((*P_91147).Indent + 2), 32);
Llstreamwrite_75246((*P_91147).Outp, LOC24);
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195844));
break;
case ((NU8) 0):
Newline_91030(P_91147);
LOC25 = 0;
LOC25 = nsuRepeatChar((*P_91147).Indent, 32);
Llstreamwrite_75246((*P_91147).Outp, LOC25);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Emit);
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195845));
(*P_91147).Emitpar += 1;
break;
}
(*P_91147).State = ((NU8) 1);
while (1) {
switch (((NU8)((*P_91147).X->data[J_91149]))) {
case 0:
goto LA26;
break;
case 1 ... 31:
case 128 ... 255:
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195846));
LOC27 = 0;
LOC27 = nsuToHex(((NI64) (((NU8)((*P_91147).X->data[J_91149])))), 2);
Llstreamwrite_75246((*P_91147).Outp, LOC27);
J_91149 += 1;
break;
case 92:
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195847));
J_91149 += 1;
break;
case 39:
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195848));
J_91149 += 1;
break;
case 34:
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195849));
J_91149 += 1;
break;
default:
if (!((NU8)((*P_91147).X->data[J_91149]) == (NU8)((*P_91147).Subschar))) goto LA29;
J_91149 += 1;
switch (((NU8)((*P_91147).X->data[J_91149]))) {
case 123:
(*P_91147).Info.Col = ((NI16) (J_91149));
Llstreamwrite_75250((*P_91147).Outp, 34);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Conc);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Tostr);
Llstreamwrite_75250((*P_91147).Outp, 40);
J_91149 += 1;
Curly_91150 = 0;
while (1) {
switch (((NU8)((*P_91147).X->data[J_91149]))) {
case 0:
Localerror_48144((*P_91147).Info, ((NU8) 183), ((NimStringDesc*) &TMP195850));
goto LA31;
break;
case 123:
J_91149 += 1;
Curly_91150 += 1;
Llstreamwrite_75250((*P_91147).Outp, 123);
break;
case 125:
J_91149 += 1;
if (!(Curly_91150 == 0)) goto LA33;
goto LA31;
LA33: ;
if (!(0 < Curly_91150)) goto LA36;
Curly_91150 -= 1;
LA36: ;
Llstreamwrite_75250((*P_91147).Outp, 125);
break;
default:
Llstreamwrite_75250((*P_91147).Outp, (*P_91147).X->data[J_91149]);
J_91149 += 1;
break;
}
} LA31: ;
Llstreamwrite_75250((*P_91147).Outp, 41);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Conc);
Llstreamwrite_75250((*P_91147).Outp, 34);
break;
case 97 ... 122:
case 65 ... 90:
case 128 ... 255:
Llstreamwrite_75250((*P_91147).Outp, 34);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Conc);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Tostr);
Llstreamwrite_75250((*P_91147).Outp, 40);
while (1) {
if (!(((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(97)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(122)) || ((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(65)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(90)) || ((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(48)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(57)) || ((NU8)((*P_91147).X->data[J_91149])) >= ((NU8)(128)) && ((NU8)((*P_91147).X->data[J_91149])) <= ((NU8)(255)) || ((NU8)((*P_91147).X->data[J_91149])) == ((NU8)(46)) || ((NU8)((*P_91147).X->data[J_91149])) == ((NU8)(95)))) goto LA38;
Llstreamwrite_75250((*P_91147).Outp, (*P_91147).X->data[J_91149]);
J_91149 += 1;
} LA38: ;
Llstreamwrite_75250((*P_91147).Outp, 41);
Llstreamwrite_75246((*P_91147).Outp, (*P_91147).Conc);
Llstreamwrite_75250((*P_91147).Outp, 34);
break;
default:
if (!((NU8)((*P_91147).X->data[J_91149]) == (NU8)((*P_91147).Subschar))) goto LA40;
Llstreamwrite_75250((*P_91147).Outp, (*P_91147).Subschar);
J_91149 += 1;
goto LA39;
LA40: ;
(*P_91147).Info.Col = ((NI16) (J_91149));
Localerror_48144((*P_91147).Info, ((NU8) 164), ((NimStringDesc*) &TMP195839));
LA39: ;
break;
}
goto LA28;
LA29: ;
Llstreamwrite_75250((*P_91147).Outp, (*P_91147).X->data[J_91149]);
J_91149 += 1;
LA28: ;
break;
}
} LA26: ;
Llstreamwrite_75246((*P_91147).Outp, ((NimStringDesc*) &TMP195851));
LA2: ;
}
Ejemplo n.º 6
0
N_NIMCALL(void, parseline_197134)(ttmplparser197016* 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_197039(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_197039(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*) &TMP2598));
		nimln(78, "filter_tmpl.nim");
		while (1) {
			nimln(730, "system.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_197046(p, j);		nimln(83, "filter_tmpl.nim");
		nimln(83, "filter_tmpl.nim");
		LOC13 = 0;
		nimln(83, "filter_tmpl.nim");
		LOC13 = withinexpr_197125(&(*p));
		if (LOC13) goto LA14;
		nimln(83, "filter_tmpl.nim");
		LOC13 = endswithopr_162437((*p).X);
		LA14: ;
		(*p).Pendingexprline = LOC13;
		nimln(84, "filter_tmpl.nim");
		nimln(84, "filter_tmpl.nim");
		LOC15 = 0;
		LOC15 = whichkeyword_150353(keyw);
		switch (LOC15) {
		case ((NU8) 20):
		{
			NimStringDesc* LOC22;
			nimln(86, "filter_tmpl.nim");
			{
				nimln(702, "system.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_139349((*p).Info, ((NU16) 163), ((NimStringDesc*) &TMP2599));			}			LA17: ;
			nimln(91, "filter_tmpl.nim");
			nimln(91, "filter_tmpl.nim");
			LOC22 = 0;
			LOC22 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_162258((*p).Outp, LOC22);			nimln(92, "filter_tmpl.nim");
			llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2600));		}		break;
		case ((NU8) 28):
		case ((NU8) 64):
		case ((NU8) 60):
		case ((NU8) 65):
		case ((NU8) 25):
		case ((NU8) 7):
		case ((NU8) 9):
		case ((NU8) 50):
		case ((NU8) 35):
		case ((NU8) 13):
		case ((NU8) 38):
		case ((NU8) 59):
		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_162258((*p).Outp, LOC24);			nimln(96, "filter_tmpl.nim");
			nimln(96, "filter_tmpl.nim");
			LOC25 = 0;
			LOC25 = copyStr((*p).X, d);
			llstreamwrite_162258((*p).Outp, LOC25);			nimln(97, "filter_tmpl.nim");
			(*p).Indent = addInt((*p).Indent, 2);
		}		break;
		case ((NU8) 18):
		case ((NU8) 47):
		case ((NU8) 19):
		case ((NU8) 22):
		case ((NU8) 24):
		{
			NI TMP2601;
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			nimln(99, "filter_tmpl.nim");
			nimln(99, "filter_tmpl.nim");
			nimln(99, "filter_tmpl.nim");
			TMP2601 = subInt((*p).Indent, 2);
			LOC27 = 0;
			LOC27 = nsuRepeatChar((NI32)(TMP2601), 32);
			llstreamwrite_162258((*p).Outp, LOC27);			nimln(100, "filter_tmpl.nim");
			nimln(100, "filter_tmpl.nim");
			LOC28 = 0;
			LOC28 = copyStr((*p).X, d);
			llstreamwrite_162258((*p).Outp, LOC28);		}		break;
		case ((NU8) 37):
		case ((NU8) 63):
		case ((NU8) 11):
		case ((NU8) 62):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			nimln(102, "filter_tmpl.nim");
			nimln(102, "filter_tmpl.nim");
			LOC30 = 0;
			LOC30 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_162258((*p).Outp, LOC30);			nimln(103, "filter_tmpl.nim");
			nimln(103, "filter_tmpl.nim");
			LOC31 = 0;
			LOC31 = copyStr((*p).X, d);
			llstreamwrite_162258((*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_84683((*p).X, TMP2602);
				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_162258((*p).Outp, LOC38);			nimln(109, "filter_tmpl.nim");
			nimln(109, "filter_tmpl.nim");
			LOC39 = 0;
			LOC39 = copyStr((*p).X, d);
			llstreamwrite_162258((*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 TMP2603;
			NimStringDesc* LOC42;
			nimln(121, "filter_tmpl.nim");
			llstreamwrite_162258((*p).Outp, (*p).Conc);			nimln(122, "filter_tmpl.nim");
			llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2597));			nimln(123, "filter_tmpl.nim");
			nimln(123, "filter_tmpl.nim");
			nimln(123, "filter_tmpl.nim");
			TMP2603 = addInt((*p).Indent, 2);
			LOC42 = 0;
			LOC42 = nsuRepeatChar((NI32)(TMP2603), 32);
			llstreamwrite_162258((*p).Outp, LOC42);			nimln(124, "filter_tmpl.nim");
			llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2604));		}		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC44;
			nimln(126, "filter_tmpl.nim");
			newline_197039(p);			nimln(127, "filter_tmpl.nim");
			nimln(127, "filter_tmpl.nim");
			LOC44 = 0;
			LOC44 = nsuRepeatChar((*p).Indent, 32);
			llstreamwrite_162258((*p).Outp, LOC44);			nimln(128, "filter_tmpl.nim");
			llstreamwrite_162258((*p).Outp, (*p).Emit);			nimln(129, "filter_tmpl.nim");
			llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2605));			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_162258((*p).Outp, ((NimStringDesc*) &TMP2606));				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_162258((*p).Outp, LOC48);				nimln(139, "filter_tmpl.nim");
				j = addInt(j, 1);
			}			break;
			case 92:
			{
				nimln(141, "filter_tmpl.nim");
				llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2607));				nimln(142, "filter_tmpl.nim");
				j = addInt(j, 1);
			}			break;
			case 39:
			{
				nimln(144, "filter_tmpl.nim");
				llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2608));				nimln(145, "filter_tmpl.nim");
				j = addInt(j, 1);
			}			break;
			case 34:
			{
				nimln(147, "filter_tmpl.nim");
				llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2609));				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_162263((*p).Outp, 34);						nimln(157, "filter_tmpl.nim");
						llstreamwrite_162258((*p).Outp, (*p).Conc);						nimln(158, "filter_tmpl.nim");
						llstreamwrite_162258((*p).Outp, (*p).Tostr);						nimln(159, "filter_tmpl.nim");
						llstreamwrite_162263((*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_139349((*p).Info, ((NU16) 188), ((NimStringDesc*) &TMP2610));								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_162263((*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(706, "system.nim");
									if (!(0 < curly)) goto LA68;
									nimln(174, "filter_tmpl.nim");
									curly = subInt(curly, 1);
								}								LA68: ;
								nimln(175, "filter_tmpl.nim");
								llstreamwrite_162263((*p).Outp, 125);							}							break;
							default:
							{
								nimln(177, "filter_tmpl.nim");
								if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
								llstreamwrite_162263((*p).Outp, (*p).X->data[j]);								nimln(178, "filter_tmpl.nim");
								j = addInt(j, 1);
							}							break;
							}
						} LA58: ;
						nimln(179, "filter_tmpl.nim");
						llstreamwrite_162263((*p).Outp, 41);						nimln(180, "filter_tmpl.nim");
						llstreamwrite_162258((*p).Outp, (*p).Conc);						nimln(181, "filter_tmpl.nim");
						llstreamwrite_162263((*p).Outp, 34);					}					break;
					case 97 ... 122:
					case 65 ... 90:
					case 128 ... 255:
					{
						nimln(183, "filter_tmpl.nim");
						llstreamwrite_162263((*p).Outp, 34);						nimln(184, "filter_tmpl.nim");
						llstreamwrite_162258((*p).Outp, (*p).Conc);						nimln(185, "filter_tmpl.nim");
						llstreamwrite_162258((*p).Outp, (*p).Tostr);						nimln(186, "filter_tmpl.nim");
						llstreamwrite_162263((*p).Outp, 40);						nimln(187, "filter_tmpl.nim");
						while (1) {
							nimln(730, "system.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_162263((*p).Outp, (*p).X->data[j]);							nimln(189, "filter_tmpl.nim");
							j = addInt(j, 1);
						} LA72: ;
						nimln(190, "filter_tmpl.nim");
						llstreamwrite_162263((*p).Outp, 41);						nimln(191, "filter_tmpl.nim");
						llstreamwrite_162258((*p).Outp, (*p).Conc);						nimln(192, "filter_tmpl.nim");
						llstreamwrite_162263((*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_162263((*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_139349((*p).Info, ((NU16) 167), ((NimStringDesc*) &TMP2611));						}						LA74: ;
					}					break;
					}
				}				goto LA53;
				LA55: ;
				{
					nimln(201, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).X->Sup.len)) raiseIndexError();
					llstreamwrite_162263((*p).Outp, (*p).X->data[j]);					nimln(202, "filter_tmpl.nim");
					j = addInt(j, 1);
				}				LA53: ;
			}			break;
			}
		} LA45: ;
		nimln(203, "filter_tmpl.nim");
		llstreamwrite_162258((*p).Outp, ((NimStringDesc*) &TMP2612));	}	LA2: ;
	popFrame();
}
Ejemplo n.º 7
0
N_NIMCALL(NimStringDesc*, mangle_528847_2036603609)(NimStringDesc* name0) {
	NimStringDesc* result0;
	result0 = (NimStringDesc*)0;
	result0 = rawNewString(((NI) ((name0 ? name0->Sup.len : 0))));
	switch (((NU8)(name0->data[((NI) 0)]))) {
	case 65 ... 90:
	case 97 ... 122:
	{
		result0 = addChar(result0, name0->data[((NI) 0)]);
	}
	break;
	case 48 ... 57:
	{
		NimStringDesc* LOC3;
		LOC3 = (NimStringDesc*)0;
		LOC3 = rawNewString(2);
appendString(LOC3, ((NimStringDesc*) &T2036603609_4));
appendChar(LOC3, name0->data[((NI) 0)]);
		result0 = resizeString(result0, LOC3->Sup.len + 0);
appendString(result0, LOC3);
	}
	break;
	default:
	{
		NimStringDesc* LOC5;
		NimStringDesc* LOC6;
		LOC5 = (NimStringDesc*)0;
		LOC6 = (NimStringDesc*)0;
		LOC6 = nsuToHex(((NI64) (((NU8)(name0->data[((NI) 0)])))), ((NI) 2));
		LOC5 = rawNewString(LOC6->Sup.len + 3);
appendString(LOC5, ((NimStringDesc*) &T2036603609_5));
appendString(LOC5, LOC6);
		result0 = LOC5;
	}
	break;
	}
	{
		NI i_528868_2036603609;
		NI HEX3Atmp_528879_2036603609;
		NI res_528882_2036603609;
		i_528868_2036603609 = (NI)0;
		HEX3Atmp_528879_2036603609 = (NI)0;
		HEX3Atmp_528879_2036603609 = (NI)((name0 ? name0->Sup.len : 0) - ((NI) 1));
		res_528882_2036603609 = ((NI) 1);
		{
			while (1) {
				NIM_CHAR c0;
				if (!(res_528882_2036603609 <= HEX3Atmp_528879_2036603609)) goto LA9;
				i_528868_2036603609 = res_528882_2036603609;
				c0 = name0->data[i_528868_2036603609];
				switch (((NU8)(c0))) {
				case 65 ... 90:
				{
					NIM_CHAR LOC11;
					LOC11 = (NIM_CHAR)0;
					LOC11 = nsuToLowerAsciiChar(c0);
					result0 = addChar(result0, LOC11);
				}
				break;
				case 95:
				{
				}
				break;
				case 97 ... 122:
				case 48 ... 57:
				{
					result0 = addChar(result0, c0);
				}
				break;
				default:
				{
					NimStringDesc* LOC15;
					NimStringDesc* LOC16;
					LOC15 = (NimStringDesc*)0;
					LOC16 = (NimStringDesc*)0;
					LOC16 = nsuToHex(((NI64) (((NU8)(c0)))), ((NI) 2));
					LOC15 = rawNewString(LOC16->Sup.len + 3);
appendString(LOC15, ((NimStringDesc*) &T2036603609_5));
appendString(LOC15, LOC16);
					result0 = resizeString(result0, LOC15->Sup.len + 0);
appendString(result0, LOC15);
				}
				break;
				}
				res_528882_2036603609 += ((NI) 1);
			} LA9: ;
		}
	}
	return result0;
}
Ejemplo n.º 8
0
N_NIMCALL(trope121007*, makellvmstring_366621)(NimStringDesc* s) {
	trope121007* result;
	NimStringDesc* res;
	NI i_366636;
	NI HEX3Atmp_366647;
	NI TMP5594;
	NI res_366649;
	trope121007* LOC10;
	nimfr("makeLLVMString", "ccgutils.nim")
	result = 0;
	nimln(167, "ccgutils.nim");
	result = NIM_NIL;
	nimln(168, "ccgutils.nim");
	res = copyString(((NimStringDesc*) &TMP5593));
	i_366636 = 0;
	HEX3Atmp_366647 = 0;
	nimln(169, "ccgutils.nim");
	nimln(169, "ccgutils.nim");
	nimln(169, "ccgutils.nim");
	TMP5594 = subInt(s->Sup.len, 1);
	HEX3Atmp_366647 = (NI64)(TMP5594);
	nimln(1301, "system.nim");
	res_366649 = 0;
	nimln(1302, "system.nim");
	while (1) {
		nimln(1302, "system.nim");
		if (!(res_366649 <= HEX3Atmp_366647)) goto LA1;
		nimln(1301, "system.nim");
		i_366636 = res_366649;
		nimln(170, "ccgutils.nim");
		{
			NI TMP5595;
			NI TMP5596;
			trope121007* LOC6;
			nimln(170, "ccgutils.nim");
			nimln(170, "ccgutils.nim");
			nimln(170, "ccgutils.nim");
			TMP5595 = addInt(i_366636, 1);
			TMP5596 = modInt((NI64)(TMP5595), 64);
			if (!(((NI) ((NI64)(TMP5596))) == 0)) goto LA4;
			nimln(171, "ccgutils.nim");
			nimln(171, "ccgutils.nim");
			LOC6 = 0;
			LOC6 = torope_121058(res);
			app_121040(&result, LOC6);			nimln(172, "ccgutils.nim");
			res = setLengthStr(res, 0);
		}		LA4: ;
		nimln(173, "ccgutils.nim");
		if ((NU)(i_366636) > (NU)(s->Sup.len)) raiseIndexError();
		switch (((NU8)(s->data[i_366636]))) {
		case 0 ... 31:
		case 128 ... 255:
		case 34:
		case 92:
		{
			NimStringDesc* LOC8;
			nimln(175, "ccgutils.nim");
			res = addChar(res, 92);
			nimln(176, "ccgutils.nim");
			nimln(176, "ccgutils.nim");
			nimln(176, "ccgutils.nim");
			if ((NU)(i_366636) > (NU)(s->Sup.len)) raiseIndexError();
			LOC8 = 0;
			LOC8 = nsuToHex(((NI64) (((NU8)(s->data[i_366636])))), 2);
			res = resizeString(res, LOC8->Sup.len + 0);
appendString(res, LOC8);
		}		break;
		default:
		{
			nimln(177, "ccgutils.nim");
			if ((NU)(i_366636) > (NU)(s->Sup.len)) raiseIndexError();
			res = addChar(res, s->data[i_366636]);
		}		break;
		}
		nimln(1304, "system.nim");
		res_366649 = addInt(res_366649, 1);
	} LA1: ;
	nimln(178, "ccgutils.nim");
	res = resizeString(res, 4);
appendString(res, ((NimStringDesc*) &TMP5597));
	nimln(179, "ccgutils.nim");
	nimln(179, "ccgutils.nim");
	LOC10 = 0;
	LOC10 = torope_121058(res);
	app_121040(&result, LOC10);	popFrame();
	return result;
}N_NOINLINE(void, compilerccgutilsInit)(void) {
Ejemplo n.º 9
0
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, mangle_0ctHksTXSPyaxjBOgK4TiA)(NimStringDesc* name) {
	NimStringDesc* result;
	NI start;
	NIM_BOOL requiresUnderscore;
	result = (NimStringDesc*)0;
	result = rawNewString(((NI) ((name ? name->Sup.len : 0))));
	start = ((NI) 0);
	{
		NimStringDesc* T5_;
		if (!(((NU8)(name->data[((NI) 0)])) >= ((NU8)(48)) && ((NU8)(name->data[((NI) 0)])) <= ((NU8)(57)))) goto LA3_;
		T5_ = (NimStringDesc*)0;
		T5_ = rawNewString(2);
appendString(T5_, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_4));
appendChar(T5_, name->data[((NI) 0)]);
		result = resizeString(result, T5_->Sup.len + 0);
appendString(result, T5_);
		start = ((NI) 1);
	}
	LA3_: ;
	requiresUnderscore = NIM_FALSE;
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((name ? name->Sup.len : 0) - ((NI) 1));
		res = start;
		{
			while (1) {
				NIM_CHAR c;
				if (!(res <= colontmp_)) goto LA8;
				i = res;
				c = name->data[i];
				switch (((NU8)(c))) {
				case 97 ... 122:
				case 48 ... 57:
				case 65 ... 90:
				{
					result = addChar(result, c);
				}
				break;
				case 95:
				{
					{
						NIM_BOOL T13_;
						NIM_BOOL T14_;
						T13_ = (NIM_BOOL)0;
						T14_ = (NIM_BOOL)0;
						T14_ = (((NI) 0) < i);
						if (!(T14_)) goto LA15_;
						T14_ = (i < (NI)((name ? name->Sup.len : 0) - ((NI) 1)));
						LA15_: ;
						T13_ = T14_;
						if (!(T13_)) goto LA16_;
						T13_ = (((NU8)(name->data[(NI)(i + ((NI) 1))])) >= ((NU8)(48)) && ((NU8)(name->data[(NI)(i + ((NI) 1))])) <= ((NU8)(57)));
						LA16_: ;
						if (!T13_) goto LA17_;
					}
					goto LA11_;
					LA17_: ;
					{
						result = addChar(result, c);
					}
					LA11_: ;
				}
				break;
				case 36:
				{
					result = resizeString(result, 6);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_5));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 37:
				{
					result = resizeString(result, 7);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_6));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 38:
				{
					result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_7));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 94:
				{
					result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_8));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 33:
				{
					result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_9));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 63:
				{
					result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_10));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 42:
				{
					result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_11));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 43:
				{
					result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_12));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 45:
				{
					result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_13));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 47:
				{
					result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_14));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 61:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_15));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 60:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_16));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 62:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_17));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 126:
				{
					result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_18));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 58:
				{
					result = resizeString(result, 5);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_19));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 46:
				{
					result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_20));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 64:
				{
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_21));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				case 124:
				{
					result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_22));
					requiresUnderscore = NIM_TRUE;
				}
				break;
				default:
				{
					NimStringDesc* T39_;
					NimStringDesc* T40_;
					T39_ = (NimStringDesc*)0;
					T40_ = (NimStringDesc*)0;
					T40_ = nsuToHex(((NI64) (((NU8)(c)))), ((NI) 2));
					T39_ = rawNewString(T40_->Sup.len + 1);
appendString(T39_, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_4));
appendString(T39_, T40_);
					result = resizeString(result, T39_->Sup.len + 0);
appendString(result, T39_);
					requiresUnderscore = NIM_TRUE;
				}
				break;
				}
				res += ((NI) 1);
			} LA8: ;
		}
	}
	{
		if (!requiresUnderscore) goto LA43_;
		result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TM_Z07Nb1SkYoziC0Zz9be4mTA_23));
	}
	LA43_: ;
	return result;
}
Ejemplo n.º 10
0
N_NIMCALL(NimStringDesc*, mangle_468847)(NimStringDesc* name) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(((NI) ((name ? name->Sup.len : 0))));
	switch (((NU8)(name->data[((NI) 0)]))) {
	case 65 ... 90:
	case 97 ... 122:
	{
		result = addChar(result, name->data[((NI) 0)]);
	}
	break;
	case 48 ... 57:
	{
		NimStringDesc* LOC3;
		LOC3 = 0;
		LOC3 = rawNewString(2);
appendString(LOC3, ((NimStringDesc*) &TMP3757));
appendChar(LOC3, name->data[((NI) 0)]);
		result = resizeString(result, LOC3->Sup.len + 0);
appendString(result, LOC3);
	}
	break;
	default:
	{
		NimStringDesc* LOC5;
		NimStringDesc* LOC6;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = nsuToHex(((NI64) (((NU8)(name->data[((NI) 0)])))), ((NI) 2));
		LOC5 = rawNewString(LOC6->Sup.len + 3);
appendString(LOC5, ((NimStringDesc*) &TMP3758));
appendString(LOC5, LOC6);
		result = LOC5;
	}
	break;
	}
	{
		NI i_468868;
		NI HEX3Atmp_468879;
		NI res_468882;
		i_468868 = 0;
		HEX3Atmp_468879 = 0;
		HEX3Atmp_468879 = (NI)((name ? name->Sup.len : 0) - ((NI) 1));
		res_468882 = ((NI) 1);
		{
			while (1) {
				NIM_CHAR c;
				if (!(res_468882 <= HEX3Atmp_468879)) goto LA9;
				i_468868 = res_468882;
				c = name->data[i_468868];
				switch (((NU8)(c))) {
				case 65 ... 90:
				{
					NIM_CHAR LOC11;
					LOC11 = 0;
					LOC11 = nsuToLowerChar(c);
					result = addChar(result, LOC11);
				}
				break;
				case 95:
				{
				}
				break;
				case 97 ... 122:
				case 48 ... 57:
				{
					result = addChar(result, c);
				}
				break;
				default:
				{
					NimStringDesc* LOC15;
					NimStringDesc* LOC16;
					LOC15 = 0;
					LOC16 = 0;
					LOC16 = nsuToHex(((NI64) (((NU8)(c)))), ((NI) 2));
					LOC15 = rawNewString(LOC16->Sup.len + 3);
appendString(LOC15, ((NimStringDesc*) &TMP3758));
appendString(LOC15, LOC16);
					result = resizeString(result, LOC15->Sup.len + 0);
appendString(result, LOC15);
				}
				break;
				}
				res_468882 += ((NI) 1);
			} LA9: ;
		}
	}
	return result;
}
Ejemplo n.º 11
0
N_NIMCALL(trope149007*, makellvmstring_470723)(NimStringDesc* s) {
	trope149007* result;
	NimStringDesc* res;
	NI i_470741;
	NI HEX3Atmp_470753;
	NI TMP6211;
	NI res_470755;
	trope149007* LOC10;
	nimfr("makeLLVMString", "ccgutils.nim")
	result = 0;
	nimln(187, "ccgutils.nim");
	result = NIM_NIL;
	nimln(188, "ccgutils.nim");
	res = copyString(((NimStringDesc*) &TMP6210));
	i_470741 = 0;
	HEX3Atmp_470753 = 0;
	nimln(189, "ccgutils.nim");
	nimln(189, "ccgutils.nim");
	nimln(189, "ccgutils.nim");
	TMP6211 = subInt(s->Sup.len, 1);
	HEX3Atmp_470753 = (NI32)(TMP6211);
	nimln(1451, "system.nim");
	res_470755 = 0;
	nimln(1452, "system.nim");
	while (1) {
		nimln(1452, "system.nim");
		if (!(res_470755 <= HEX3Atmp_470753)) goto LA1;
		nimln(1451, "system.nim");
		i_470741 = res_470755;
		nimln(190, "ccgutils.nim");
		{
			NI TMP6212;
			NI TMP6213;
			trope149007* LOC6;
			nimln(190, "ccgutils.nim");
			nimln(190, "ccgutils.nim");
			nimln(190, "ccgutils.nim");
			TMP6212 = addInt(i_470741, 1);
			TMP6213 = modInt((NI32)(TMP6212), 64);
			if (!(((NI) ((NI32)(TMP6213))) == 0)) goto LA4;
			nimln(191, "ccgutils.nim");
			nimln(191, "ccgutils.nim");
			LOC6 = 0;
			LOC6 = torope_149058(res);
			app_149040(&result, LOC6);
			nimln(192, "ccgutils.nim");
			res = setLengthStr(res, 0);
		}
		LA4: ;
		nimln(193, "ccgutils.nim");
		if ((NU)(i_470741) > (NU)(s->Sup.len)) raiseIndexError();
		switch (((NU8)(s->data[i_470741]))) {
		case 0 ... 31:
		case 128 ... 255:
		case 34:
		case 92:
		{
			NimStringDesc* LOC8;
			nimln(195, "ccgutils.nim");
			res = addChar(res, 92);
			nimln(196, "ccgutils.nim");
			nimln(196, "ccgutils.nim");
			nimln(196, "ccgutils.nim");
			if ((NU)(i_470741) > (NU)(s->Sup.len)) raiseIndexError();
			LOC8 = 0;
			LOC8 = nsuToHex(((NI64) (((NU8)(s->data[i_470741])))), 2);
			res = resizeString(res, LOC8->Sup.len + 0);
appendString(res, LOC8);
		}
		break;
		default:
		{
			nimln(197, "ccgutils.nim");
			if ((NU)(i_470741) > (NU)(s->Sup.len)) raiseIndexError();
			res = addChar(res, s->data[i_470741]);
		}
		break;
		}
		nimln(1454, "system.nim");
		res_470755 = addInt(res_470755, 1);
	} LA1: ;
	nimln(198, "ccgutils.nim");
	res = resizeString(res, 4);
appendString(res, ((NimStringDesc*) &TMP6214));
	nimln(199, "ccgutils.nim");
	nimln(199, "ccgutils.nim");
	LOC10 = 0;
	LOC10 = torope_149058(res);
	app_149040(&result, LOC10);
	popFrame();
	return result;
}
Ejemplo n.º 12
0
N_NIMCALL(NimStringDesc*, mangle_470684)(NimStringDesc* name) {
	NimStringDesc* result;
	NI i_470706;
	NI HEX3Atmp_470716;
	NI TMP6209;
	NI res_470718;
	nimfr("mangle", "ccgutils.nim")
	result = 0;
	nimln(165, "ccgutils.nim");
	result = copyString(((NimStringDesc*) &TMP6206));
	nimln(166, "ccgutils.nim");
	if ((NU)(0) > (NU)(name->Sup.len)) raiseIndexError();
	switch (((NU8)(name->data[0]))) {
	case 65 ... 90:
	case 97 ... 122:
	{
		NIM_CHAR LOC2;
		nimln(168, "ccgutils.nim");
		nimln(168, "ccgutils.nim");
		if ((NU)(0) > (NU)(name->Sup.len)) raiseIndexError();
		LOC2 = 0;
		LOC2 = nsuToLowerChar(name->data[0]);
		result = addChar(result, LOC2);
	}
	break;
	case 48 ... 57:
	{
		NimStringDesc* LOC4;
		nimln(170, "ccgutils.nim");
		nimln(170, "ccgutils.nim");
		LOC4 = 0;
		if ((NU)(0) > (NU)(name->Sup.len)) raiseIndexError();
		LOC4 = rawNewString(2);
appendString(LOC4, ((NimStringDesc*) &TMP6207));
appendChar(LOC4, name->data[0]);
		result = resizeString(result, LOC4->Sup.len + 0);
appendString(result, LOC4);
	}
	break;
	default:
	{
		NimStringDesc* LOC6;
		NimStringDesc* LOC7;
		nimln(172, "ccgutils.nim");
		nimln(172, "ccgutils.nim");
		LOC6 = 0;
		nimln(172, "ccgutils.nim");
		nimln(172, "ccgutils.nim");
		if ((NU)(0) > (NU)(name->Sup.len)) raiseIndexError();
		LOC7 = 0;
		LOC7 = nsuToHex(((NI64) (((NU8)(name->data[0])))), 2);
		LOC6 = rawNewString(LOC7->Sup.len + 3);
appendString(LOC6, ((NimStringDesc*) &TMP6208));
appendString(LOC6, LOC7);
		result = LOC6;
	}
	break;
	}
	i_470706 = 0;
	HEX3Atmp_470716 = 0;
	nimln(173, "ccgutils.nim");
	nimln(173, "ccgutils.nim");
	nimln(173, "ccgutils.nim");
	TMP6209 = subInt(name->Sup.len, 1);
	HEX3Atmp_470716 = (NI32)(TMP6209);
	nimln(1458, "system.nim");
	res_470718 = 1;
	nimln(1459, "system.nim");
	while (1) {
		NIM_CHAR c;
		nimln(1459, "system.nim");
		if (!(res_470718 <= HEX3Atmp_470716)) goto LA8;
		nimln(1458, "system.nim");
		i_470706 = res_470718;
		nimln(174, "ccgutils.nim");
		if ((NU)(i_470706) > (NU)(name->Sup.len)) raiseIndexError();
		c = name->data[i_470706];
		nimln(175, "ccgutils.nim");
		switch (((NU8)(c))) {
		case 65 ... 90:
		{
			NIM_CHAR LOC10;
			nimln(177, "ccgutils.nim");
			nimln(177, "ccgutils.nim");
			LOC10 = 0;
			LOC10 = nsuToLowerChar(c);
			result = addChar(result, LOC10);
		}
		break;
		case 95:
		{
		}
		break;
		case 97 ... 122:
		case 48 ... 57:
		{
			nimln(181, "ccgutils.nim");
			result = addChar(result, c);
		}
		break;
		default:
		{
			NimStringDesc* LOC14;
			NimStringDesc* LOC15;
			nimln(183, "ccgutils.nim");
			nimln(183, "ccgutils.nim");
			LOC14 = 0;
			nimln(183, "ccgutils.nim");
			nimln(183, "ccgutils.nim");
			LOC15 = 0;
			LOC15 = nsuToHex(((NI64) (((NU8)(c)))), 2);
			LOC14 = rawNewString(LOC15->Sup.len + 3);
appendString(LOC14, ((NimStringDesc*) &TMP6208));
appendString(LOC14, LOC15);
			result = resizeString(result, LOC14->Sup.len + 0);
appendString(result, LOC14);
		}
		break;
		}
		nimln(1461, "system.nim");
		res_470718 = addInt(res_470718, 1);
	} LA8: ;
	popFrame();
	return result;
}
Ejemplo n.º 13
0
N_NIMCALL(void, parseline_216149)(Ttmplparser216020* 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 = ((NI) 0);
	{
		nimln(69, "filter_tmpl.nim");
		while (1) {
			NI TMP3355;
			if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
			if (!((NU8)((*p).x->data[j]) == (NU8)(32))) goto LA2;
			TMP3355 = addInt(j, ((NI) 1));
			j = (NI)(TMP3355);
		} LA2: ;
	}
	nimln(70, "filter_tmpl.nim");
	{
		NIM_BOOL LOC5;
		LOC5 = 0;
		if ((NU)(((NI) 0)) > (NU)((*p).x->Sup.len)) raiseIndexError();
		LOC5 = ((NU8)((*p).x->data[((NI) 0)]) == (NU8)((*p).nimdirective));
		if (!(LOC5)) goto LA6;
		if ((NU)(((NI) 1)) > (NU)((*p).x->Sup.len)) raiseIndexError();
		LOC5 = ((NU8)((*p).x->data[((NI) 1)]) == (NU8)(33));
		LA6: ;
		if (!LOC5) goto LA7;
		nimln(71, "filter_tmpl.nim");
		newline_216047(p);
	}
	goto LA3;
	LA7: ;
	{
		NI TMP3356;
		NIM_BOOL LOC16;
		NU16 LOC18;
		nimln(72, "filter_tmpl.nim");
		if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
		if (!((NU8)((*p).x->data[j]) == (NU8)((*p).nimdirective))) goto LA10;
		nimln(73, "filter_tmpl.nim");
		newline_216047(p);
		nimln(74, "filter_tmpl.nim");
		TMP3356 = addInt(j, ((NI) 1));
		j = (NI)(TMP3356);
		{
			nimln(75, "filter_tmpl.nim");
			while (1) {
				NI TMP3357;
				if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
				if (!((NU8)((*p).x->data[j]) == (NU8)(32))) goto LA13;
				TMP3357 = addInt(j, ((NI) 1));
				j = (NI)(TMP3357);
			} LA13: ;
		}
		nimln(76, "filter_tmpl.nim");
		d = j;
		nimln(77, "filter_tmpl.nim");
		keyw = copyString(((NimStringDesc*) &TMP3358));
		{
			nimln(78, "filter_tmpl.nim");
			while (1) {
				NI TMP3359;
				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 LA15;
				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");
				TMP3359 = addInt(j, ((NI) 1));
				j = (NI)(TMP3359);
			} LA15: ;
		}
		nimln(82, "filter_tmpl.nim");
		scanpar_216057(p, j);
		nimln(83, "filter_tmpl.nim");
		LOC16 = 0;
		LOC16 = withinexpr_216139((&(*p)));
		if (LOC16) goto LA17;
		LOC16 = endswithopr_176450((*p).x);
		LA17: ;
		(*p).pendingexprline = LOC16;
		nimln(84, "filter_tmpl.nim");
		LOC18 = 0;
		LOC18 = whichkeyword_170396(keyw);
		switch (LOC18) {
		case ((NU16) 22):
		{
			NimStringDesc* LOC25;
			nimln(86, "filter_tmpl.nim");
			{
				NI TMP3360;
				if (!(((NI) 2) <= (*p).indent)) goto LA22;
				nimln(87, "filter_tmpl.nim");
				TMP3360 = subInt((*p).indent, ((NI) 2));
				(*p).indent = (NI)(TMP3360);
			}
			goto LA20;
			LA22: ;
			{
				nimln(89, "filter_tmpl.nim");
				(*p).info.col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
				nimln(90, "filter_tmpl.nim");
				localerror_163155((*p).info, ((NU16) 163), ((NimStringDesc*) &TMP3361));
			}
			LA20: ;
			nimln(91, "filter_tmpl.nim");
			LOC25 = 0;
			LOC25 = nsuRepeatChar(32, ((NI)chckRange((*p).indent, ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC25);
			nimln(92, "filter_tmpl.nim");
			llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3362));
		}
		break;
		case ((NU16) 31):
		case ((NU16) 65):
		case ((NU16) 60):
		case ((NU16) 66):
		case ((NU16) 27):
		case ((NU16) 7):
		case ((NU16) 9):
		case ((NU16) 51):
		case ((NU16) 38):
		case ((NU16) 14):
		case ((NU16) 40):
		case ((NU16) 59):
		case ((NU16) 41):
		{
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			NI TMP3363;
			nimln(95, "filter_tmpl.nim");
			LOC27 = 0;
			LOC27 = nsuRepeatChar(32, ((NI)chckRange((*p).indent, ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC27);
			nimln(96, "filter_tmpl.nim");
			LOC28 = 0;
			LOC28 = copyStr((*p).x, d);
			llstreamwrite_176665((*p).outp, LOC28);
			nimln(97, "filter_tmpl.nim");
			TMP3363 = addInt((*p).indent, ((NI) 2));
			(*p).indent = (NI)(TMP3363);
		}
		break;
		case ((NU16) 20):
		case ((NU16) 48):
		case ((NU16) 21):
		case ((NU16) 24):
		case ((NU16) 26):
		{
			NI TMP3364;
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			nimln(99, "filter_tmpl.nim");
			TMP3364 = subInt((*p).indent, ((NI) 2));
			LOC30 = 0;
			LOC30 = nsuRepeatChar(32, ((NI)chckRange((NI)(TMP3364), ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC30);
			nimln(100, "filter_tmpl.nim");
			LOC31 = 0;
			LOC31 = copyStr((*p).x, d);
			llstreamwrite_176665((*p).outp, LOC31);
		}
		break;
		case ((NU16) 39):
		case ((NU16) 64):
		case ((NU16) 12):
		case ((NU16) 62):
		{
			NimStringDesc* LOC33;
			NimStringDesc* LOC34;
			nimln(102, "filter_tmpl.nim");
			LOC33 = 0;
			LOC33 = nsuRepeatChar(32, ((NI)chckRange((*p).indent, ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC33);
			nimln(103, "filter_tmpl.nim");
			LOC34 = 0;
			LOC34 = copyStr((*p).x, d);
			llstreamwrite_176665((*p).outp, LOC34);
			nimln(104, "filter_tmpl.nim");
			{
				NIM_BOOL LOC37;
				NI TMP3366;
				LOC37 = 0;
				LOC37 = contains_99373((*p).x, TMP3365);
				if (!!(LOC37)) goto LA38;
				nimln(106, "filter_tmpl.nim");
				TMP3366 = addInt((*p).indent, ((NI) 2));
				(*p).indent = (NI)(TMP3366);
			}
			LA38: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC41;
			NimStringDesc* LOC42;
			nimln(108, "filter_tmpl.nim");
			LOC41 = 0;
			LOC41 = nsuRepeatChar(32, ((NI)chckRange((*p).indent, ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC41);
			nimln(109, "filter_tmpl.nim");
			LOC42 = 0;
			LOC42 = copyStr((*p).x, d);
			llstreamwrite_176665((*p).outp, LOC42);
		}
		break;
		}
		nimln(110, "filter_tmpl.nim");
		(*p).state = ((NU8) 0);
	}
	goto LA3;
	LA10: ;
	{
		nimln(114, "filter_tmpl.nim");
		(*p).par = ((NI) 0);
		nimln(115, "filter_tmpl.nim");
		(*p).curly = ((NI) 0);
		nimln(116, "filter_tmpl.nim");
		(*p).bracket = ((NI) 0);
		nimln(117, "filter_tmpl.nim");
		j = ((NI) 0);
		nimln(118, "filter_tmpl.nim");
		switch ((*p).state) {
		case ((NU8) 1):
		{
			NI TMP3367;
			NimStringDesc* LOC45;
			nimln(121, "filter_tmpl.nim");
			llstreamwrite_176665((*p).outp, (*p).conc);
			nimln(122, "filter_tmpl.nim");
			llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3347));
			nimln(123, "filter_tmpl.nim");
			TMP3367 = addInt((*p).indent, ((NI) 2));
			LOC45 = 0;
			LOC45 = nsuRepeatChar(32, ((NI)chckRange((NI)(TMP3367), ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC45);
			nimln(124, "filter_tmpl.nim");
			llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3368));
		}
		break;
		case ((NU8) 0):
		{
			NimStringDesc* LOC47;
			NI TMP3370;
			nimln(126, "filter_tmpl.nim");
			newline_216047(p);
			nimln(127, "filter_tmpl.nim");
			LOC47 = 0;
			LOC47 = nsuRepeatChar(32, ((NI)chckRange((*p).indent, ((NI) 0), ((NI) IL64(9223372036854775807)))));
			llstreamwrite_176665((*p).outp, LOC47);
			nimln(128, "filter_tmpl.nim");
			llstreamwrite_176665((*p).outp, (*p).emit);
			nimln(129, "filter_tmpl.nim");
			llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3369));
			nimln(130, "filter_tmpl.nim");
			TMP3370 = addInt((*p).emitpar, ((NI) 1));
			(*p).emitpar = (NI)(TMP3370);
		}
		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 LA48;
				}
				break;
				case 1 ... 31:
				case 128 ... 255:
				{
					NimStringDesc* LOC52;
					NI TMP3372;
					nimln(137, "filter_tmpl.nim");
					llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3371));
					nimln(138, "filter_tmpl.nim");
					if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
					LOC52 = 0;
					LOC52 = nsuToHex(((NI64) (((NU8)((*p).x->data[j])))), ((NI) 2));
					llstreamwrite_176665((*p).outp, LOC52);
					nimln(139, "filter_tmpl.nim");
					TMP3372 = addInt(j, ((NI) 1));
					j = (NI)(TMP3372);
				}
				break;
				case 92:
				{
					NI TMP3374;
					nimln(141, "filter_tmpl.nim");
					llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3373));
					nimln(142, "filter_tmpl.nim");
					TMP3374 = addInt(j, ((NI) 1));
					j = (NI)(TMP3374);
				}
				break;
				case 39:
				{
					NI TMP3376;
					nimln(144, "filter_tmpl.nim");
					llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3375));
					nimln(145, "filter_tmpl.nim");
					TMP3376 = addInt(j, ((NI) 1));
					j = (NI)(TMP3376);
				}
				break;
				case 34:
				{
					NI TMP3378;
					nimln(147, "filter_tmpl.nim");
					llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3377));
					nimln(148, "filter_tmpl.nim");
					TMP3378 = addInt(j, ((NI) 1));
					j = (NI)(TMP3378);
				}
				break;
				default:
				{
					nimln(150, "filter_tmpl.nim");
					{
						NI TMP3379;
						if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
						if (!((NU8)((*p).x->data[j]) == (NU8)((*p).subschar))) goto LA59;
						nimln(152, "filter_tmpl.nim");
						TMP3379 = addInt(j, ((NI) 1));
						j = (NI)(TMP3379);
						nimln(153, "filter_tmpl.nim");
						if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
						switch (((NU8)((*p).x->data[j]))) {
						case 123:
						{
							NI TMP3380;
							nimln(155, "filter_tmpl.nim");
							(*p).info.col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
							nimln(156, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 34);
							nimln(157, "filter_tmpl.nim");
							llstreamwrite_176665((*p).outp, (*p).conc);
							nimln(158, "filter_tmpl.nim");
							llstreamwrite_176665((*p).outp, (*p).tostr);
							nimln(159, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 40);
							nimln(160, "filter_tmpl.nim");
							TMP3380 = addInt(j, ((NI) 1));
							j = (NI)(TMP3380);
							nimln(161, "filter_tmpl.nim");
							curly = ((NI) 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_163155((*p).info, ((NU16) 188), ((NimStringDesc*) &TMP3381));
										nimln(166, "filter_tmpl.nim");
										goto LA62;
									}
									break;
									case 123:
									{
										NI TMP3382;
										NI TMP3383;
										nimln(168, "filter_tmpl.nim");
										TMP3382 = addInt(j, ((NI) 1));
										j = (NI)(TMP3382);
										nimln(169, "filter_tmpl.nim");
										TMP3383 = addInt(curly, ((NI) 1));
										curly = (NI)(TMP3383);
										nimln(170, "filter_tmpl.nim");
										llstreamwrite_176696((*p).outp, 123);
									}
									break;
									case 125:
									{
										NI TMP3384;
										nimln(172, "filter_tmpl.nim");
										TMP3384 = addInt(j, ((NI) 1));
										j = (NI)(TMP3384);
										nimln(173, "filter_tmpl.nim");
										{
											if (!(curly == ((NI) 0))) goto LA69;
											goto LA62;
										}
										LA69: ;
										nimln(174, "filter_tmpl.nim");
										{
											NI TMP3385;
											if (!(((NI) 0) < curly)) goto LA73;
											TMP3385 = subInt(curly, ((NI) 1));
											curly = (NI)(TMP3385);
										}
										LA73: ;
										nimln(175, "filter_tmpl.nim");
										llstreamwrite_176696((*p).outp, 125);
									}
									break;
									default:
									{
										NI TMP3386;
										nimln(177, "filter_tmpl.nim");
										if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
										llstreamwrite_176696((*p).outp, (*p).x->data[j]);
										nimln(178, "filter_tmpl.nim");
										TMP3386 = addInt(j, ((NI) 1));
										j = (NI)(TMP3386);
									}
									break;
									}
								}
							} LA62: ;
							nimln(179, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 41);
							nimln(180, "filter_tmpl.nim");
							llstreamwrite_176665((*p).outp, (*p).conc);
							nimln(181, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 34);
						}
						break;
						case 97 ... 122:
						case 65 ... 90:
						case 128 ... 255:
						{
							nimln(183, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 34);
							nimln(184, "filter_tmpl.nim");
							llstreamwrite_176665((*p).outp, (*p).conc);
							nimln(185, "filter_tmpl.nim");
							llstreamwrite_176665((*p).outp, (*p).tostr);
							nimln(186, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 40);
							{
								nimln(187, "filter_tmpl.nim");
								while (1) {
									NI TMP3387;
									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 LA78;
									nimln(188, "filter_tmpl.nim");
									if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
									llstreamwrite_176696((*p).outp, (*p).x->data[j]);
									nimln(189, "filter_tmpl.nim");
									TMP3387 = addInt(j, ((NI) 1));
									j = (NI)(TMP3387);
								} LA78: ;
							}
							nimln(190, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 41);
							nimln(191, "filter_tmpl.nim");
							llstreamwrite_176665((*p).outp, (*p).conc);
							nimln(192, "filter_tmpl.nim");
							llstreamwrite_176696((*p).outp, 34);
						}
						break;
						default:
						{
							nimln(194, "filter_tmpl.nim");
							{
								NI TMP3388;
								if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
								if (!((NU8)((*p).x->data[j]) == (NU8)((*p).subschar))) goto LA82;
								nimln(195, "filter_tmpl.nim");
								llstreamwrite_176696((*p).outp, (*p).subschar);
								nimln(196, "filter_tmpl.nim");
								TMP3388 = addInt(j, ((NI) 1));
								j = (NI)(TMP3388);
							}
							goto LA80;
							LA82: ;
							{
								nimln(198, "filter_tmpl.nim");
								(*p).info.col = ((NI16)chckRange(j, ((NI16) -32768), ((NI16) 32767)));
								nimln(199, "filter_tmpl.nim");
								localerror_163155((*p).info, ((NU16) 167), ((NimStringDesc*) &TMP3389));
							}
							LA80: ;
						}
						break;
						}
					}
					goto LA57;
					LA59: ;
					{
						NI TMP3390;
						nimln(201, "filter_tmpl.nim");
						if ((NU)(j) > (NU)((*p).x->Sup.len)) raiseIndexError();
						llstreamwrite_176696((*p).outp, (*p).x->data[j]);
						nimln(202, "filter_tmpl.nim");
						TMP3390 = addInt(j, ((NI) 1));
						j = (NI)(TMP3390);
					}
					LA57: ;
				}
				break;
				}
			}
		} LA48: ;
		nimln(203, "filter_tmpl.nim");
		llstreamwrite_176665((*p).outp, ((NimStringDesc*) &TMP3391));
	}
	LA3: ;
	popFrame();
}
N_NIMCALL(void, parseline_314109_4161173357)(Ttmplparser314010* p0) {
	NI d0;
	NI j0;
	NI curly0;
	NimStringDesc* keyw0;
	d0 = (NI)0;
	j0 = (NI)0;
	curly0 = (NI)0;
	keyw0 = (NimStringDesc*)0;
	j0 = ((NI) 0);
	{
		while (1) {
			if (!((NU8)((*p0).x->data[j0]) == (NU8)(32))) goto LA2;
			j0 += ((NI) 1);
		} LA2: ;
	}
	{
		NIM_BOOL LOC5;
		LOC5 = (NIM_BOOL)0;
		LOC5 = ((NU8)((*p0).x->data[((NI) 0)]) == (NU8)((*p0).nimdirective));
		if (!(LOC5)) goto LA6;
		LOC5 = ((NU8)((*p0).x->data[((NI) 1)]) == (NU8)(63));
		LA6: ;
		if (!LOC5) goto LA7;
		newline_314031_4161173357(p0);
	}
	goto LA3;
	LA7: ;
	{
		NIM_BOOL LOC16;
		Tspecialword273003 LOC18;
		if (!((NU8)((*p0).x->data[j0]) == (NU8)((*p0).nimdirective))) goto LA10;
		newline_314031_4161173357(p0);
		j0 += ((NI) 1);
		{
			while (1) {
				if (!((NU8)((*p0).x->data[j0]) == (NU8)(32))) goto LA13;
				j0 += ((NI) 1);
			} LA13: ;
		}
		d0 = j0;
		keyw0 = copyString(((NimStringDesc*) &T4161173357_2));
		{
			while (1) {
				if (!(((NU8)((*p0).x->data[j0])) >= ((NU8)(97)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(122)) || ((NU8)((*p0).x->data[j0])) >= ((NU8)(65)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(90)) || ((NU8)((*p0).x->data[j0])) >= ((NU8)(48)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(57)) || ((NU8)((*p0).x->data[j0])) >= ((NU8)(128)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(255)) || ((NU8)((*p0).x->data[j0])) == ((NU8)(46)) || ((NU8)((*p0).x->data[j0])) == ((NU8)(95)))) goto LA15;
				keyw0 = addChar(keyw0, (*p0).x->data[j0]);
				j0 += ((NI) 1);
			} LA15: ;
		}
		scanpar_314035_4161173357(p0, j0);
		LOC16 = (NIM_BOOL)0;
		LOC16 = withinexpr_314105_4161173357((&(*p0)));
		if (LOC16) goto LA17;
		LOC16 = endswithopr_280432_597494479((*p0).x);
		LA17: ;
		(*p0).pendingexprline = LOC16;
		LOC18 = (Tspecialword273003)0;
		LOC18 = whichkeyword_273369_1391470768(keyw0);
		switch (LOC18) {
		case ((Tspecialword273003) 22):
		{
			NimStringDesc* LOC25;
			{
				if (!(((NI) 2) <= (*p0).indent)) goto LA22;
				(*p0).indent -= ((NI) 2);
			}
			goto LA20;
			LA22: ;
			{
				(*p0).info.col = ((NI16) (j0));
				localerror_194080_155036129((*p0).info, ((Tmsgkind189002) 167), ((NimStringDesc*) &T4161173357_12));
			}
			LA20: ;
			LOC25 = (NimStringDesc*)0;
			LOC25 = nsuRepeatChar(32, ((NI) ((*p0).indent)));
			llstreamwrite_280593_597494479((*p0).outp, LOC25);
			llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_13));
		}
		break;
		case ((Tspecialword273003) 31):
		case ((Tspecialword273003) 65):
		case ((Tspecialword273003) 60):
		case ((Tspecialword273003) 66):
		case ((Tspecialword273003) 27):
		case ((Tspecialword273003) 7):
		case ((Tspecialword273003) 9):
		case ((Tspecialword273003) 51):
		case ((Tspecialword273003) 38):
		case ((Tspecialword273003) 14):
		case ((Tspecialword273003) 40):
		case ((Tspecialword273003) 59):
		case ((Tspecialword273003) 41):
		{
			NimStringDesc* LOC27;
			NimStringDesc* LOC28;
			LOC27 = (NimStringDesc*)0;
			LOC27 = nsuRepeatChar(32, ((NI) ((*p0).indent)));
			llstreamwrite_280593_597494479((*p0).outp, LOC27);
			LOC28 = (NimStringDesc*)0;
			LOC28 = copyStr((*p0).x, d0);
			llstreamwrite_280593_597494479((*p0).outp, LOC28);
			(*p0).indent += ((NI) 2);
		}
		break;
		case ((Tspecialword273003) 20):
		case ((Tspecialword273003) 48):
		case ((Tspecialword273003) 21):
		case ((Tspecialword273003) 24):
		case ((Tspecialword273003) 26):
		{
			NimStringDesc* LOC30;
			NimStringDesc* LOC31;
			LOC30 = (NimStringDesc*)0;
			LOC30 = nsuRepeatChar(32, ((NI) ((NI)((*p0).indent - ((NI) 2)))));
			llstreamwrite_280593_597494479((*p0).outp, LOC30);
			LOC31 = (NimStringDesc*)0;
			LOC31 = copyStr((*p0).x, d0);
			llstreamwrite_280593_597494479((*p0).outp, LOC31);
		}
		break;
		case ((Tspecialword273003) 39):
		case ((Tspecialword273003) 64):
		case ((Tspecialword273003) 12):
		case ((Tspecialword273003) 62):
		{
			NimStringDesc* LOC33;
			NimStringDesc* LOC34;
			LOC33 = (NimStringDesc*)0;
			LOC33 = nsuRepeatChar(32, ((NI) ((*p0).indent)));
			llstreamwrite_280593_597494479((*p0).outp, LOC33);
			LOC34 = (NimStringDesc*)0;
			LOC34 = copyStr((*p0).x, d0);
			llstreamwrite_280593_597494479((*p0).outp, LOC34);
			{
				NIM_BOOL LOC37;
				LOC37 = (NIM_BOOL)0;
				LOC37 = contains_109056_4286263276((*p0).x, T4161173357_14);
				if (!!(LOC37)) goto LA38;
				(*p0).indent += ((NI) 2);
			}
			LA38: ;
		}
		break;
		default:
		{
			NimStringDesc* LOC41;
			NimStringDesc* LOC42;
			LOC41 = (NimStringDesc*)0;
			LOC41 = nsuRepeatChar(32, ((NI) ((*p0).indent)));
			llstreamwrite_280593_597494479((*p0).outp, LOC41);
			LOC42 = (NimStringDesc*)0;
			LOC42 = copyStr((*p0).x, d0);
			llstreamwrite_280593_597494479((*p0).outp, LOC42);
		}
		break;
		}
		(*p0).state = ((Tparsestate314008) 0);
	}
	goto LA3;
	LA10: ;
	{
		(*p0).par = ((NI) 0);
		(*p0).curly = ((NI) 0);
		(*p0).bracket = ((NI) 0);
		j0 = ((NI) 0);
		switch ((*p0).state) {
		case ((Tparsestate314008) 1):
		{
			NimStringDesc* LOC45;
			llstreamwrite_280593_597494479((*p0).outp, (*p0).conc);
			llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_11));
			LOC45 = (NimStringDesc*)0;
			LOC45 = nsuRepeatChar(32, ((NI) ((NI)((*p0).indent + ((NI) 2)))));
			llstreamwrite_280593_597494479((*p0).outp, LOC45);
			llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_15));
		}
		break;
		case ((Tparsestate314008) 0):
		{
			NimStringDesc* LOC47;
			newline_314031_4161173357(p0);
			LOC47 = (NimStringDesc*)0;
			LOC47 = nsuRepeatChar(32, ((NI) ((*p0).indent)));
			llstreamwrite_280593_597494479((*p0).outp, LOC47);
			llstreamwrite_280593_597494479((*p0).outp, (*p0).emit);
			llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_16));
			(*p0).emitpar += ((NI) 1);
		}
		break;
		}
		(*p0).state = ((Tparsestate314008) 1);
		{
			while (1) {
				switch (((NU8)((*p0).x->data[j0]))) {
				case 0:
				{
					goto LA48;
				}
				break;
				case 1 ... 31:
				case 128 ... 255:
				{
					NimStringDesc* LOC52;
					llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_17));
					LOC52 = (NimStringDesc*)0;
					LOC52 = nsuToHex(((NI64) (((NU8)((*p0).x->data[j0])))), ((NI) 2));
					llstreamwrite_280593_597494479((*p0).outp, LOC52);
					j0 += ((NI) 1);
				}
				break;
				case 92:
				{
					llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_18));
					j0 += ((NI) 1);
				}
				break;
				case 39:
				{
					llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_19));
					j0 += ((NI) 1);
				}
				break;
				case 34:
				{
					llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_20));
					j0 += ((NI) 1);
				}
				break;
				default:
				{
					{
						if (!((NU8)((*p0).x->data[j0]) == (NU8)((*p0).subschar))) goto LA59;
						j0 += ((NI) 1);
						switch (((NU8)((*p0).x->data[j0]))) {
						case 123:
						{
							(*p0).info.col = ((NI16) (j0));
							llstreamwrite_280612_597494479((*p0).outp, 34);
							llstreamwrite_280593_597494479((*p0).outp, (*p0).conc);
							llstreamwrite_280593_597494479((*p0).outp, (*p0).tostr);
							llstreamwrite_280612_597494479((*p0).outp, 40);
							j0 += ((NI) 1);
							curly0 = ((NI) 0);
							{
								while (1) {
									switch (((NU8)((*p0).x->data[j0]))) {
									case 0:
									{
										localerror_194080_155036129((*p0).info, ((Tmsgkind189002) 193), ((NimStringDesc*) &T4161173357_21));
										goto LA62;
									}
									break;
									case 123:
									{
										j0 += ((NI) 1);
										curly0 += ((NI) 1);
										llstreamwrite_280612_597494479((*p0).outp, 123);
									}
									break;
									case 125:
									{
										j0 += ((NI) 1);
										{
											if (!(curly0 == ((NI) 0))) goto LA69;
											goto LA62;
										}
										LA69: ;
										{
											if (!(((NI) 0) < curly0)) goto LA73;
											curly0 -= ((NI) 1);
										}
										LA73: ;
										llstreamwrite_280612_597494479((*p0).outp, 125);
									}
									break;
									default:
									{
										llstreamwrite_280612_597494479((*p0).outp, (*p0).x->data[j0]);
										j0 += ((NI) 1);
									}
									break;
									}
								}
							} LA62: ;
							llstreamwrite_280612_597494479((*p0).outp, 41);
							llstreamwrite_280593_597494479((*p0).outp, (*p0).conc);
							llstreamwrite_280612_597494479((*p0).outp, 34);
						}
						break;
						case 97 ... 122:
						case 65 ... 90:
						case 128 ... 255:
						{
							llstreamwrite_280612_597494479((*p0).outp, 34);
							llstreamwrite_280593_597494479((*p0).outp, (*p0).conc);
							llstreamwrite_280593_597494479((*p0).outp, (*p0).tostr);
							llstreamwrite_280612_597494479((*p0).outp, 40);
							{
								while (1) {
									if (!(((NU8)((*p0).x->data[j0])) >= ((NU8)(97)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(122)) || ((NU8)((*p0).x->data[j0])) >= ((NU8)(65)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(90)) || ((NU8)((*p0).x->data[j0])) >= ((NU8)(48)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(57)) || ((NU8)((*p0).x->data[j0])) >= ((NU8)(128)) && ((NU8)((*p0).x->data[j0])) <= ((NU8)(255)) || ((NU8)((*p0).x->data[j0])) == ((NU8)(46)) || ((NU8)((*p0).x->data[j0])) == ((NU8)(95)))) goto LA78;
									llstreamwrite_280612_597494479((*p0).outp, (*p0).x->data[j0]);
									j0 += ((NI) 1);
								} LA78: ;
							}
							llstreamwrite_280612_597494479((*p0).outp, 41);
							llstreamwrite_280593_597494479((*p0).outp, (*p0).conc);
							llstreamwrite_280612_597494479((*p0).outp, 34);
						}
						break;
						default:
						{
							{
								if (!((NU8)((*p0).x->data[j0]) == (NU8)((*p0).subschar))) goto LA82;
								llstreamwrite_280612_597494479((*p0).outp, (*p0).subschar);
								j0 += ((NI) 1);
							}
							goto LA80;
							LA82: ;
							{
								(*p0).info.col = ((NI16) (j0));
								localerror_194080_155036129((*p0).info, ((Tmsgkind189002) 171), ((NimStringDesc*) &T4161173357_10));
							}
							LA80: ;
						}
						break;
						}
					}
					goto LA57;
					LA59: ;
					{
						llstreamwrite_280612_597494479((*p0).outp, (*p0).x->data[j0]);
						j0 += ((NI) 1);
					}
					LA57: ;
				}
				break;
				}
			}
		} LA48: ;
		llstreamwrite_280593_597494479((*p0).outp, ((NimStringDesc*) &T4161173357_22));
	}
	LA3: ;
}