// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x5100
movb 0x28(%r14), %al
movb %al, 0x28(%rbx)
movq 0x20(%r14), %rax
movq %rax, 0x20(%rbx)
movq %rbx, %rdi
callq 0x13d4c
movq %rbx, %rdi
callq 0x13d4c
leaq 0x100(%rbx), %r14
leaq 0x22eff(%rip), %rsi     # 0x368f0
movq %r14, %rdi
callq 0x17c60
leaq 0x3ea(%rip), %rcx       # 0x13dea
movq %rcx, (%rax)
xorl %ebp, %ebp
movq %rbp, 0x8(%rax)
leaq 0x22f00(%rip), %rsi     # 0x36910
movq %r14, %rdi
callq 0x17c60
leaq 0x505(%rip), %rcx       # 0x13f24
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f03(%rip), %rsi     # 0x36930
movq %r14, %rdi
callq 0x17c60
leaq 0x890(%rip), %rcx       # 0x142cc
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f66(%rip), %rsi     # 0x369b0
movq %r14, %rdi
callq 0x17c60
leaq 0x923(%rip), %r12       # 0x1437c
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f29(%rip), %r15     # 0x36990
movq %r14, %rdi
movq %r15, %rsi
callq 0x17c60
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23190(%rip), %rsi     # 0x36c10
movq %r14, %rdi
callq 0x17c60
leaq 0x9b7(%rip), %r12       # 0x14446
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23193(%rip), %rsi     # 0x36c30
movq %r14, %rdi
callq 0x17c60
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231bd(%rip), %rsi     # 0x36c70
movq %r14, %rdi
callq 0x17c60
leaq 0xa3e(%rip), %rcx       # 0x14500
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231e0(%rip), %rsi     # 0x36cb0
movq %r14, %rdi
callq 0x17c60
leaq 0xb5d(%rip), %rcx       # 0x1463c
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231e3(%rip), %rsi     # 0x36cd0
movq %r14, %rdi
callq 0x17c60
leaq 0xc2c(%rip), %rcx       # 0x14728
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23206(%rip), %rsi     # 0x36d10
movq %r14, %rdi
callq 0x17c60
leaq 0xd1f(%rip), %rcx       # 0x14838
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23209(%rip), %rsi     # 0x36d30
movq %r14, %rdi
callq 0x17c60
leaq 0xeb2(%rip), %rcx       # 0x149e8
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x2320c(%rip), %rsi     # 0x36d50
movq %r14, %rdi
callq 0x17c60
leaq 0x1045(%rip), %rcx      # 0x14b98
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x2320f(%rip), %rsi     # 0x36d70
movq %r14, %rdi
callq 0x17c60
leaq 0x11de(%rip), %rcx      # 0x14d4e
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23212(%rip), %rsi     # 0x36d90
movq %r14, %rdi
callq 0x17c60
leaq 0x1371(%rip), %rcx      # 0x14efe
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23215(%rip), %rsi     # 0x36db0
movq %r14, %rdi
callq 0x17c60
leaq 0x1666(%rip), %rcx      # 0x15210
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f98(%rip), %r12     # 0x36b50
movq %r14, %rdi
movq %r12, %rsi
callq 0x17c60
leaq 0x1958(%rip), %rcx      # 0x15522
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22ff8(%rip), %r13     # 0x36bd0
movq %r14, %rdi
movq %r13, %rsi
callq 0x17c60
leaq 0x1980(%rip), %rcx      # 0x1556a
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f98(%rip), %rsi     # 0x36b90
movq %r14, %rdi
callq 0x17c60
leaq 0x1a7f(%rip), %rcx      # 0x15686
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
addq $0x138, %rbx            # imm = 0x138
leaq 0x22d54(%rip), %rsi     # 0x36970
movq %rbx, %rdi
callq 0x18062
leaq 0x1c0b(%rip), %r14      # 0x15836
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22da5(%rip), %rsi     # 0x369f0
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d6f(%rip), %rsi     # 0x369d0
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d99(%rip), %rsi     # 0x36a10
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22e23(%rip), %rsi     # 0x36ab0
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22e2d(%rip), %rsi     # 0x36ad0
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22db7(%rip), %rsi     # 0x36a70
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22dc1(%rip), %rsi     # 0x36a90
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d4b(%rip), %rsi     # 0x36a30
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d55(%rip), %rsi     # 0x36a50
movq %rbx, %rdi
callq 0x18062
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x18062
leaq 0x1bfc(%rip), %rcx      # 0x15918
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x18062
leaq 0x1d33(%rip), %rcx      # 0x15a68
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop