// File: /workspace/github_cpp_makefile_star2_O3/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 0x13d2e
movq %rbx, %rdi
callq 0x13d2e
leaq 0x100(%rbx), %r14
leaq 0x22f1d(%rip), %rsi     # 0x368f0
movq %r14, %rdi
callq 0x17b76
leaq 0x3ea(%rip), %rcx       # 0x13dcc
movq %rcx, (%rax)
xorl %ebp, %ebp
movq %rbp, 0x8(%rax)
leaq 0x22f1e(%rip), %rsi     # 0x36910
movq %r14, %rdi
callq 0x17b76
leaq 0x505(%rip), %rcx       # 0x13f06
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f21(%rip), %rsi     # 0x36930
movq %r14, %rdi
callq 0x17b76
leaq 0x884(%rip), %rcx       # 0x142a2
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f84(%rip), %rsi     # 0x369b0
movq %r14, %rdi
callq 0x17b76
leaq 0x90d(%rip), %r12       # 0x14348
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22f47(%rip), %r15     # 0x36990
movq %r14, %rdi
movq %r15, %rsi
callq 0x17b76
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231ae(%rip), %rsi     # 0x36c10
movq %r14, %rdi
callq 0x17b76
leaq 0x991(%rip), %r12       # 0x14402
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231b1(%rip), %rsi     # 0x36c30
movq %r14, %rdi
callq 0x17b76
movq %r12, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231db(%rip), %rsi     # 0x36c70
movq %r14, %rdi
callq 0x17b76
leaq 0xa0a(%rip), %rcx       # 0x144ae
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x231fe(%rip), %rsi     # 0x36cb0
movq %r14, %rdi
callq 0x17b76
leaq 0xb1f(%rip), %rcx       # 0x145e0
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23201(%rip), %rsi     # 0x36cd0
movq %r14, %rdi
callq 0x17b76
leaq 0xbe6(%rip), %rcx       # 0x146c4
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23224(%rip), %rsi     # 0x36d10
movq %r14, %rdi
callq 0x17b76
leaq 0xcc7(%rip), %rcx       # 0x147c2
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23227(%rip), %rsi     # 0x36d30
movq %r14, %rdi
callq 0x17b76
leaq 0xe62(%rip), %rcx       # 0x1497a
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x2322a(%rip), %rsi     # 0x36d50
movq %r14, %rdi
callq 0x17b76
leaq 0xffd(%rip), %rcx       # 0x14b32
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x2322d(%rip), %rsi     # 0x36d70
movq %r14, %rdi
callq 0x17b76
leaq 0x119a(%rip), %rcx      # 0x14cec
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23230(%rip), %rsi     # 0x36d90
movq %r14, %rdi
callq 0x17b76
leaq 0x1335(%rip), %rcx      # 0x14ea4
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23233(%rip), %rsi     # 0x36db0
movq %r14, %rdi
callq 0x17b76
leaq 0x162a(%rip), %rcx      # 0x151b6
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22fb6(%rip), %r12     # 0x36b50
movq %r14, %rdi
movq %r12, %rsi
callq 0x17b76
leaq 0x191c(%rip), %rcx      # 0x154c8
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x23016(%rip), %r13     # 0x36bd0
movq %r14, %rdi
movq %r13, %rsi
callq 0x17b76
leaq 0x1944(%rip), %rcx      # 0x15510
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22fb6(%rip), %rsi     # 0x36b90
movq %r14, %rdi
callq 0x17b76
leaq 0x1a59(%rip), %rcx      # 0x15642
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
addq $0x138, %rbx            # imm = 0x138
leaq 0x22d72(%rip), %rsi     # 0x36970
movq %rbx, %rdi
callq 0x17f6e
leaq 0x1beb(%rip), %r14      # 0x157f8
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movq %r15, %rsi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22dc3(%rip), %rsi     # 0x369f0
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d8d(%rip), %rsi     # 0x369d0
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22db7(%rip), %rsi     # 0x36a10
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22e41(%rip), %rsi     # 0x36ab0
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22e4b(%rip), %rsi     # 0x36ad0
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22dd5(%rip), %rsi     # 0x36a70
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22ddf(%rip), %rsi     # 0x36a90
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d69(%rip), %rsi     # 0x36a30
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
leaq 0x22d73(%rip), %rsi     # 0x36a50
movq %rbx, %rdi
callq 0x17f6e
movq %r14, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x17f6e
leaq 0x1bd2(%rip), %rcx      # 0x158d0
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x17f6e
leaq 0x1d19(%rip), %rcx      # 0x15a30
movq %rcx, (%rax)
movq %rbp, 0x8(%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop