// File: /workspace/github_cpp_makefile_star2_O1/WayfireWM[P]wf-utils/wayfire/lexer/lexer.cpp
// Function: wf::lexer_t::_parse_literal[abi:cxx11]()
variant_t lexer_t::_parse_literal()
{
    // Catch out char and string literals first.
    auto c = _text.substr(_parse_position, 1);
    if ((c == "\'") || (c == "\""))
    {
        return _parse_encapsulated_literal(c, c);
    }

    // It is possible that the literal is 1 character long (Structures and operators).
    if ((contains(OPERATORS, c)) || (contains(STRUCTURES, c)))
    {
         ++_parse_position;
        return parse_literal(c);
    }

    // A literal is denoted from _position until the first occurrence of one of ')', '(', '&', '|', '!', ' ', '"', '\''
    auto end = std::string::npos;
    for (const auto &s : OPERATORS)
    {
        end = std::min(end, _text.find(s, _parse_position));
    }
    for (const auto &s : STRUCTURES)
    {
        end = std::min(end, _text.find(s, _parse_position));
    }
    for (const auto &s : DELIMITERS)
    {
        end = std::min(end, _text.find(s, _parse_position));
    }

    // If we found none of them, the literal ends at the end of _text
    if (end == std::string::npos)
    {
        end = _size;
    }

    // At this point we know that the literal we want is between _parse_position and end. Extract and return.
    auto length = end - _parse_position;
    auto literal_text = _text.substr(_parse_position, length);
    _parse_position += length;
    return parse_literal(literal_text);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsi), %r15
movq 0x28(%rsi), %rdx
leaq 0x8(%rsp), %r12
movl $0x1, %ecx
movq %r12, %rdi
movq %r15, %rsi
callq 0x5250
leaq 0x60e6(%rip), %rsi      # 0xd6e4
movq %r12, %rdi
callq 0x5080
testl %eax, %eax
je 0x765c
leaq 0x5bd4(%rip), %rsi      # 0xd1e5
leaq 0x8(%rsp), %rdi
callq 0x5080
testl %eax, %eax
je 0x765c
leaq 0xcc42(%rip), %rdi      # 0x14268
leaq 0x8(%rsp), %rsi
callq 0x7a57
testb %al, %al
jne 0x7649
leaq 0xcc5d(%rip), %rdi      # 0x14298
leaq 0x8(%rsp), %rsi
callq 0x7a57
testb %al, %al
je 0x769c
incq 0x28(%r14)
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x8123
jmp 0x766f
leaq 0x8(%rsp), %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %rcx, %rdx
callq 0x78aa
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x768a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5230
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xcbdd(%rip), %r13      # 0x14280
leaq 0xcbc6(%rip), %rbp      # 0x14270
movq $-0x1, %r12
cmpq %rbp, %r13
je 0x76e1
movq 0x28(%r14), %rdx
movq 0x20(%r13), %rcx
movq 0x28(%r13), %rsi
movq %r15, %rdi
callq 0x5380
cmpq %r12, %rax
cmovbq %rax, %r12
movq %r13, %rdi
callq 0x5280
movq %rax, %r13
cmpq %rbp, %rax
jne 0x76b6
movq 0xcbc8(%rip), %r13      # 0x142b0
leaq 0xcbb1(%rip), %rbp      # 0x142a0
cmpq %rbp, %r13
je 0x771f
movq 0x28(%r14), %rdx
movq 0x20(%r13), %rcx
movq 0x28(%r13), %rsi
movq %r15, %rdi
callq 0x5380
cmpq %r12, %rax
cmovbq %rax, %r12
movq %r13, %rdi
callq 0x5280
movq %rax, %r13
cmpq %rbp, %rax
jne 0x76f4
movq 0xcbba(%rip), %r13      # 0x142e0
leaq 0xcba3(%rip), %rbp      # 0x142d0
cmpq %rbp, %r13
je 0x775d
movq 0x28(%r14), %rdx
movq 0x20(%r13), %rcx
movq 0x28(%r13), %rsi
movq %r15, %rdi
callq 0x5380
cmpq %r12, %rax
cmovbq %rax, %r12
movq %r13, %rdi
callq 0x5280
movq %rax, %r13
cmpq %rbp, %rax
jne 0x7732
cmpq $-0x1, %r12
jne 0x7766
movq (%r14), %r12
movq 0x28(%r14), %rdx
subq %rdx, %r12
leaq 0x28(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rcx
callq 0x5250
addq %r12, 0x28(%r14)
leaq 0x28(%rsp), %rsi
movq %rbx, %rdi
callq 0x8123
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x766f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0x766f
movq %rax, %rbx
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77d7
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0x77d7
jmp 0x77d4
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x77f2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x5230
movq %rbx, %rdi
callq 0x5390