// File: /workspace/github_cpp_makefile_star2_O2/Nallantli[P]Rossa/main/rossa/parser/parser.cpp
// Function: parser_t::printError(rossa_error_t const&)
void parser_t::printError(const rossa_error_t &e)
{
	printc(e.what(), RED_TEXT);
	std::cout << "\n";

	if (e.getToken().type != NULL_TOK)
	{
		std::string lineInfoRaw = "<" + e.getToken().filename.string() + ">:" + std::to_string(e.getToken().lineNumber + 1) + " | ";
		printc(lineInfoRaw, CYAN_TEXT);
		printc(e.getToken().line + "\n", MAGENTA_TEXT);

		std::string ret = "";
		for (size_t i = 0; i < e.getToken().distance - e.getToken().valueString.size() + lineInfoRaw.size(); i++)
		{
			ret += " ";
		}
		ret += "^";

		if (e.getToken().valueString.size() > 0)
		{
			for (size_t i = 0; i < e.getToken().valueString.size() - 1; i++)
			{
				ret += "~";
			}
		}
		printc(ret + "\n", RED_TEXT);
	}

	size_t j = 0;
	auto trace = e.getTrace();
	while (!trace.empty())
	{
		if (j++ > 10)
		{
			printc(util::format(_STACK_TRACE_MORE_, {std::to_string(trace.size())}), MAGENTA_TEXT);
			std::cout << "\n";
			trace.clear();
			break;
		}
		auto e = trace.back();
		printc(" ^ ", BLUE_TEXT);
		std::string ret = "";
		if (e.second.getParent().getKey() != "")
		{
			ret += e.second.getParent().getKey() + ".";
		}
		ret += ROSSA_DEHASH(e.second.key);
		printc(ret + "(", BRIGHT_BLACK_TEXT);
		size_t i = 0;
		for (auto &p : e.second.params)
		{
			if (i++ > 0)
			{
				printc(", ", RESET_TEXT);
			}
			if (p.first) {
				printc("ref ", BLUE_TEXT);
			}
			printc(ROSSA_DEHASH(p.second), RESET_TEXT);
		}
		printc(")\n", BRIGHT_BLACK_TEXT);
		printc("\t<" + e.first.filename.string() + ">:" + std::to_string(e.first.lineNumber) + " | ", CYAN_TEXT);
		printc(e.first.line + "\n", MAGENTA_TEXT);
		trace.pop_back();
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x10(%rax)
leaq 0x108(%rsp), %rdi
movq %rsp, %rdx
movq %rax, %rsi
callq 0x1c814
leaq 0x20(%rsp), %rsi
movl $0x1f, (%rsi)
leaq 0x108(%rsp), %rdi
callq 0x1c84f
leaq 0x108(%rsp), %rdi
callq 0x101d0
movq 0x9792b(%rip), %rdi     # 0xb5f88
leaq 0x594b9(%rip), %rsi     # 0x77b1d
callq 0x103b0
movq %rbx, %rdi
callq 0x3ec26
cmpl $0x0, 0x78(%rax)
je 0x1e888
movq %rbx, %rdi
callq 0x3ec26
leaq 0x88(%rsp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x1f1e6
leaq 0x57d08(%rip), %rsi     # 0x763a5
leaq 0x40(%rsp), %rdi
movq %r14, %rdx
callq 0x1ca9c
leaq 0x57ccc(%rip), %rdx     # 0x7637d
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
callq 0x1ca7d
movq %rbx, %rdi
callq 0x3ec26
movq 0x48(%rax), %rsi
incq %rsi
leaq 0xa8(%rsp), %rdi
callq 0x1f201
leaq 0x20(%rsp), %rdi
movq %rsp, %rsi
leaq 0xa8(%rsp), %rdx
callq 0x1f17f
leaq 0x57c8a(%rip), %rdx     # 0x76380
leaq 0x108(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1ca7d
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x101d0
leaq 0xa8(%rsp), %rdi
callq 0x101d0
movq %rsp, %rdi
callq 0x101d0
leaq 0x40(%rsp), %rdi
callq 0x101d0
leaq 0x88(%rsp), %rdi
callq 0x101d0
movl $0x24, (%r14)
leaq 0x108(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1c84f
movq %rbx, %rdi
callq 0x3ec26
addq $0x28, %rax
leaq 0x593b0(%rip), %rdx     # 0x77b1d
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x1cb3b
movq %rsp, %rsi
movl $0x23, (%rsi)
leaq 0x20(%rsp), %rdi
callq 0x1c84f
leaq 0x20(%rsp), %rdi
callq 0x101d0
leaq 0x57a10(%rip), %rsi     # 0x761ae
leaq 0x20(%rsp), %rdi
movq %rsp, %rdx
callq 0x1c814
xorl %r12d, %r12d
leaq 0x5a40e(%rip), %r14     # 0x78bc3
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
callq 0x3ec26
movq 0x50(%rax), %r13
movq %rbx, %rdi
callq 0x3ec26
subq 0x60(%rax), %r13
addq 0x110(%rsp), %r13
cmpq %r13, %r12
jae 0x1e7ef
movq %r15, %rdi
movq %r14, %rsi
callq 0x10760
incq %r12
jmp 0x1e7ba
leaq 0x57853(%rip), %rsi     # 0x76049
leaq 0x20(%rsp), %rdi
callq 0x10760
movq %rbx, %rdi
callq 0x3ec26
cmpq $0x0, 0x60(%rax)
je 0x1e842
xorl %r12d, %r12d
leaq 0x57870(%rip), %r14     # 0x76089
leaq 0x20(%rsp), %r15
movq %rbx, %rdi
callq 0x3ec26
movq 0x60(%rax), %rax
decq %rax
cmpq %rax, %r12
jae 0x1e842
movq %r15, %rdi
movq %r14, %rsi
callq 0x10760
incq %r12
jmp 0x1e81e
leaq 0x592d4(%rip), %rdx     # 0x77b1d
movq %rsp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x1cb3b
leaq 0x40(%rsp), %rsi
movl $0x1f, (%rsi)
movq %rsp, %rdi
callq 0x1c84f
movq %rsp, %rdi
callq 0x101d0
leaq 0x20(%rsp), %rdi
callq 0x101d0
leaq 0x108(%rsp), %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x3ec2c
leaq 0x68(%rsp), %rdi
movq %rax, %rsi
callq 0x1f244
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbp
leaq 0x40(%rsp), %r14
movq %rsp, %r15
leaq 0x88(%rsp), %rbx
movq 0x70(%rsp), %rsi
cmpq %rsi, 0x68(%rsp)
je 0x1ed00
cmpq $0xb, %r13
je 0x1ec41
addq $-0x100, %rsi
leaq 0x108(%rsp), %rdi
callq 0x1f2da
movq %rbp, %rdi
leaq 0x57aab(%rip), %rsi     # 0x76398
movq %r14, %rdx
callq 0x1c814
movl $0x22, (%rsp)
movq %rbp, %rdi
movq %r15, %rsi
callq 0x1c84f
movq %rbp, %rdi
callq 0x101d0
movq %rbp, %rdi
leaq 0x57895(%rip), %rsi     # 0x761ae
movq %r15, %rdx
callq 0x1c814
movq %r14, %rdi
leaq 0x188(%rsp), %rsi
callq 0x22a1c
movq %r15, %rdi
movq %r14, %rsi
callq 0x365e4
movq %r15, %rdi
leaq 0x57868(%rip), %rsi     # 0x761ae
callq 0x1f318
movl %eax, %r12d
movq %r15, %rdi
callq 0x101d0
movq %r14, %rdi
callq 0x363f2
testb %r12b, %r12b
je 0x1e9b3
movq %rbx, %rdi
leaq 0x188(%rsp), %rsi
callq 0x22a1c
movq %r14, %rdi
movq %rbx, %rsi
callq 0x365e4
movq %r15, %rdi
movq %r14, %rsi
leaq 0x57a0b(%rip), %rdx     # 0x76396
callq 0x1cb3b
movq %rbp, %rdi
movq %r15, %rsi
callq 0x10790
movq %r15, %rdi
callq 0x101d0
movq %r14, %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x363f2
movq %r15, %rdi
leaq 0x97f4b(%rip), %rsi     # 0xb6908
leaq 0x198(%rsp), %rdx
callq 0x1f164
movq %rbp, %rdi
movq %r15, %rsi
callq 0x10790
movq %r15, %rdi
callq 0x101d0
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x577c0(%rip), %rdx     # 0x761aa
callq 0x1cb3b
movl $0x5a, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c84f
incq %r13
movq %r13, 0x80(%rsp)
movq %r15, %rdi
callq 0x101d0
movq 0x1a8(%rsp), %r12
movq 0x1b0(%rsp), %rbp
xorl %r13d, %r13d
cmpq %rbp, %r12
je 0x1eacc
subq $0x1, %r13
jb 0x1ea61
movq %r15, %rdi
leaq 0x58bd9(%rip), %rsi     # 0x7761a
movq %rbx, %rdx
callq 0x1c814
andl $0x0, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c84f
movq %r15, %rdi
callq 0x101d0
cmpb $0x1, (%r12)
jne 0x1ea95
movq %r15, %rdi
leaq 0x5792a(%rip), %rsi     # 0x7639c
movq %rbx, %rdx
callq 0x1c814
movl $0x22, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c84f
movq %r15, %rdi
callq 0x101d0
addq $0x8, %r12
movq %r15, %rdi
leaq 0x97e65(%rip), %rsi     # 0xb6908
movq %r12, %rdx
callq 0x1f164
andl $0x0, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c84f
movq %r15, %rdi
callq 0x101d0
addq $0x8, %r12
jmp 0x1ea28
movq %r15, %rdi
leaq 0x578cb(%rip), %rsi     # 0x763a1
movq %rbx, %rdx
callq 0x1c814
movl $0x5a, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c84f
leaq 0x108(%rsp), %rbx
leaq 0x20(%rsp), %rbp
movq %r15, %rdi
callq 0x101d0
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
movq %rbx, %rsi
callq 0x1f1e6
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
leaq 0x57879(%rip), %rsi     # 0x763a4
movq %r12, %rdx
callq 0x1ca9c
leaq 0x88(%rsp), %rbx
movq %rbx, %rdi
movq %r13, %rsi
leaq 0x57835(%rip), %rdx     # 0x7637d
callq 0x1ca7d
movq 0x150(%rsp), %rsi
leaq 0xe8(%rsp), %r12
movq %r12, %rdi
callq 0x1f201
movq %r14, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0x1f17f
movq %r15, %rdi
movq %r14, %rsi
leaq 0x57800(%rip), %rdx     # 0x76380
callq 0x1ca7d
movl $0x24, 0x64(%rsp)
movq %r15, %rdi
leaq 0x64(%rsp), %rsi
callq 0x1c84f
movq %r15, %rdi
callq 0x101d0
movq %r14, %rdi
callq 0x101d0
leaq 0xe8(%rsp), %rdi
callq 0x101d0
movq %rbx, %rdi
callq 0x101d0
movq %r13, %rdi
callq 0x101d0
leaq 0xc8(%rsp), %rdi
callq 0x101d0
movq %r15, %rdi
leaq 0x130(%rsp), %rsi
leaq 0x58f37(%rip), %rdx     # 0x77b1d
callq 0x1cb3b
movl $0x23, 0x40(%rsp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1c84f
movq 0x80(%rsp), %r13
movq %r15, %rdi
callq 0x101d0
movq 0x70(%rsp), %rdi
movq $-0x100, %rax
addq %rax, %rdi
movq %rdi, 0x70(%rsp)
callq 0x1def2
movq %rbp, %rdi
callq 0x101d0
leaq 0x108(%rsp), %rdi
callq 0x1def2
jmp 0x1e8b5
leaq 0x5773c(%rip), %rsi     # 0x76384
leaq 0x20(%rsp), %rdi
leaq 0xa8(%rsp), %rdx
callq 0x1c814
movq 0x70(%rsp), %rsi
subq 0x68(%rsp), %rsi
sarq $0x8, %rsi
movq %rsp, %rdi
callq 0x1f201
leaq 0x40(%rsp), %rdi
movq %rsp, %rsi
pushq $0x1
popq %rdx
leaq 0xc8(%rsp), %rcx
callq 0x1f298
leaq 0x108(%rsp), %rdi
leaq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x3f724
leaq 0x88(%rsp), %rsi
movl $0x23, (%rsi)
leaq 0x108(%rsp), %rdi
callq 0x1c84f
leaq 0x108(%rsp), %rdi
callq 0x101d0
leaq 0x40(%rsp), %rdi
callq 0x1cea0
movq %rsp, %rdi
callq 0x101d0
leaq 0x20(%rsp), %rdi
callq 0x101d0
movq 0x9729e(%rip), %rdi     # 0xb5f88
leaq 0x58e2c(%rip), %rsi     # 0x77b1d
callq 0x103b0
leaq 0x68(%rsp), %rdi
callq 0x1f2d2
leaq 0x68(%rsp), %rdi
callq 0x1cb1a
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ee9b
movq %rax, %rbx
leaq 0x108(%rsp), %rdi
callq 0x101d0
jmp 0x1ed36
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1cea0
jmp 0x1ed45
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
jmp 0x1ed52
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x101d0
jmp 0x1ef0c
jmp 0x1ee9b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
jmp 0x1eec4
jmp 0x1eec1
jmp 0x1edbe
jmp 0x1eec1
jmp 0x1edbe
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x101d0
jmp 0x1ed96
movq %rax, %rbx
leaq 0xa8(%rsp), %rdi
callq 0x101d0
jmp 0x1edc9
movq %rax, %rbx
jmp 0x1edd1
movq %rax, %rbx
jmp 0x1eddb
jmp 0x1edbe
movq %rax, %rbx
jmp 0x1ef16
jmp 0x1eec1
movq %rax, %rbx
jmp 0x1eece
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
leaq 0x40(%rsp), %rdi
callq 0x101d0
leaq 0x88(%rsp), %rdi
jmp 0x1eed6
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
jmp 0x1edf8
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x101d0
jmp 0x1ee07
movq %rax, %rbx
leaq 0x88(%rsp), %rdi
jmp 0x1eeb6
jmp 0x1eee5
movq %rax, %rbx
jmp 0x1ee7d
movq %rax, %rbx
jmp 0x1ee63
movq %rax, %rbx
jmp 0x1ee4c
jmp 0x1eee5
jmp 0x1eee5
jmp 0x1eee5
movq %rax, %rbx
jmp 0x1ee70
movq %rax, %rbx
jmp 0x1ee56
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
leaq 0x40(%rsp), %rdi
callq 0x101d0
leaq 0xe8(%rsp), %rdi
callq 0x101d0
leaq 0x88(%rsp), %rdi
callq 0x101d0
leaq 0xa8(%rsp), %rdi
callq 0x101d0
leaq 0xc8(%rsp), %rdi
jmp 0x1eef0
jmp 0x1eeea
jmp 0x1eeea
jmp 0x1ee8f
jmp 0x1eeea
movq %rax, %rbx
jmp 0x1eeff
movq %rax, %rbx
jmp 0x1eeb1
jmp 0x1eee5
movq %rax, %rbx
jmp 0x1ef0c
jmp 0x1eee5
jmp 0x1eee5
jmp 0x1eee5
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
leaq 0x40(%rsp), %rdi
callq 0x363f2
jmp 0x1eef5
jmp 0x1eeea
jmp 0x1eec1
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x101d0
leaq 0x108(%rsp), %rdi
callq 0x101d0
jmp 0x1ef16
jmp 0x1eee5
jmp 0x1eee5
jmp 0x1eeea
jmp 0x1eeea
movq %rax, %rbx
jmp 0x1eef5
movq %rax, %rbx
movq %rsp, %rdi
callq 0x101d0
leaq 0x20(%rsp), %rdi
callq 0x101d0
leaq 0x108(%rsp), %rdi
callq 0x1def2
leaq 0x68(%rsp), %rdi
callq 0x1cb1a
movq %rbx, %rdi
callq 0x106f0