// File: /workspace/github_cpp_makefile_star2_O2/pranavmodx[P]modlang/src/parser.cpp
// Function: Parser::New(Lexer&)
void Parser::New(Lexer &lexer)
{
	this->lexer = lexer;

	nextToken();
	nextToken();

	// prefix parse functions
	prefixParseFns[IDENT] = &Parser::parseIdentifier; // address of method

	prefixParseFns[INTEGER] = &Parser::parseIntegerLiteral;
	prefixParseFns[STRING] = &Parser::parseStringLiteral;

	prefixParseFns[BANG] = &Parser::parsePrefixExpression;
	prefixParseFns[MINUS] = &Parser::parsePrefixExpression;

	prefixParseFns[TRUE] = &Parser::parseBooleanLiteral;
	prefixParseFns[FALSE] = &Parser::parseBooleanLiteral;

	prefixParseFns[IF] = &Parser::parseIfExpression;
	prefixParseFns[WHILE] = &Parser::parseWhileExpression;
	prefixParseFns[FUNCTION] = &Parser::parseFunctionLiteral;

	prefixParseFns[HASHSET] = &Parser::parseHashSetLiteral;
	prefixParseFns[STACK] = &Parser::parseStackLiteral;
	prefixParseFns[QUEUE] = &Parser::parseQueueLiteral;
	prefixParseFns[DEQUE] = &Parser::parseDequeLiteral;
	prefixParseFns[MAX_HEAP] = &Parser::parseMaxHeapLiteral;
	prefixParseFns[MIN_HEAP] = &Parser::parseMinHeapLiteral;

	// brackets
	prefixParseFns[LPAREN] = &Parser::parseGroupedExpression;
	prefixParseFns[LBRACKET] = &Parser::parseArrayLiteral;
	prefixParseFns[LBRACE] = &Parser::parseHashMapLiteral;

	// infix parse functions
	infixParseFns[PLUS] = &Parser::parseInfixExpression;
	infixParseFns[MINUS] = &Parser::parseInfixExpression;
	infixParseFns[SLASH] = &Parser::parseInfixExpression;
	infixParseFns[ASTERISK] = &Parser::parseInfixExpression;
	infixParseFns[MODULO] = &Parser::parseInfixExpression;
	infixParseFns[EQ] = &Parser::parseInfixExpression;
	infixParseFns[NEQ] = &Parser::parseInfixExpression;
	infixParseFns[LTEQ] = &Parser::parseInfixExpression;
	infixParseFns[GTEQ] = &Parser::parseInfixExpression;
	infixParseFns[LT] = &Parser::parseInfixExpression;
	infixParseFns[GT] = &Parser::parseInfixExpression;

	// brackets
	infixParseFns[LPAREN] = &Parser::parseCallExpression;
	infixParseFns[LBRACKET] = &Parser::parseIndexExpression;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
callq 0x10658
movq %rbx, %rdi
callq 0xe52e
movq %rbx, %rdi
callq 0xe52e
leaq 0x100(%rbx), %r14
leaq 0x1d73d(%rip), %rsi     # 0x2b8f8
movq %r14, %rdi
callq 0x116c0
leaq 0x3ac(%rip), %rcx       # 0xe576
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d73f(%rip), %rsi     # 0x2b918
movq %r14, %rdi
callq 0x116c0
leaq 0x428(%rip), %rcx       # 0xe610
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d741(%rip), %rsi     # 0x2b938
movq %r14, %rdi
callq 0x116c0
leaq 0x600(%rip), %rcx       # 0xe806
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d7a3(%rip), %rsi     # 0x2b9b8
movq %r14, %rdi
callq 0x116c0
leaq 0x65c(%rip), %r12       # 0xe880
movq %r12, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d765(%rip), %r15     # 0x2b998
movq %r14, %rdi
movq %r15, %rsi
callq 0x116c0
movq %r12, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d9cb(%rip), %rsi     # 0x2bc18
movq %r14, %rdi
callq 0x116c0
leaq 0x6b2(%rip), %r12       # 0xe90e
movq %r12, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d9cd(%rip), %rsi     # 0x2bc38
movq %r14, %rdi
callq 0x116c0
movq %r12, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d9f6(%rip), %rsi     # 0x2bc78
movq %r14, %rdi
callq 0x116c0
leaq 0x6f1(%rip), %rcx       # 0xe982
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da18(%rip), %rsi     # 0x2bcb8
movq %r14, %rdi
callq 0x116c0
leaq 0x7e1(%rip), %rcx       # 0xea90
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da1a(%rip), %rsi     # 0x2bcd8
movq %r14, %rdi
callq 0x116c0
leaq 0x893(%rip), %rcx       # 0xeb60
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da3c(%rip), %rsi     # 0x2bd18
movq %r14, %rdi
callq 0x116c0
leaq 0x949(%rip), %rcx       # 0xec34
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da3e(%rip), %rsi     # 0x2bd38
movq %r14, %rdi
callq 0x116c0
leaq 0xa63(%rip), %rcx       # 0xed6c
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da40(%rip), %rsi     # 0x2bd58
movq %r14, %rdi
callq 0x116c0
leaq 0xb7d(%rip), %rcx       # 0xeea4
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da42(%rip), %rsi     # 0x2bd78
movq %r14, %rdi
callq 0x116c0
leaq 0xc95(%rip), %rcx       # 0xefda
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da44(%rip), %rsi     # 0x2bd98
movq %r14, %rdi
callq 0x116c0
leaq 0xdaf(%rip), %rcx       # 0xf112
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1da46(%rip), %rsi     # 0x2bdb8
movq %r14, %rdi
callq 0x116c0
leaq 0xf9f(%rip), %rcx       # 0xf320
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d7c8(%rip), %r12     # 0x2bb58
movq %r14, %rdi
movq %r12, %rsi
callq 0x116c0
leaq 0x118c(%rip), %rcx      # 0xf52e
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d827(%rip), %r13     # 0x2bbd8
movq %r14, %rdi
movq %r13, %rsi
callq 0x116c0
leaq 0x11b3(%rip), %rcx      # 0xf576
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d7c6(%rip), %rsi     # 0x2bb98
movq %r14, %rdi
callq 0x116c0
leaq 0x1261(%rip), %rcx      # 0xf642
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
addq $0x138, %rbx            # imm = 0x138
leaq 0x1d581(%rip), %rsi     # 0x2b978
movq %rbx, %rdi
callq 0x11ab8
leaq 0x136a(%rip), %r14      # 0xf770
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d5d0(%rip), %rsi     # 0x2b9f8
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d599(%rip), %rsi     # 0x2b9d8
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d5c2(%rip), %rsi     # 0x2ba18
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d64b(%rip), %rsi     # 0x2bab8
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d654(%rip), %rsi     # 0x2bad8
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d5dd(%rip), %rsi     # 0x2ba78
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d5e6(%rip), %rsi     # 0x2ba98
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d56f(%rip), %rsi     # 0x2ba38
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
leaq 0x1d578(%rip), %rsi     # 0x2ba58
movq %rbx, %rdi
callq 0x11ab8
movq %r14, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x11ab8
leaq 0x1316(%rip), %rcx      # 0xf818
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x11ab8
leaq 0x13f0(%rip), %rcx      # 0xf90c
movq %rcx, (%rax)
andq $0x0, 0x8(%rax)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq