tjdevries / vim9jit

a vim9script -> lua transpiler (written in Rust)
MIT License
510 stars 21 forks source link

Use lpeg builtin things #4

Closed tjdevries closed 1 year ago

tjdevries commented 3 years ago
l = {}
lpeg.locale(l)
for k in pairs(l) do print(k) end
tjdevries commented 3 years ago
function extract_quote(openp,endp)
    openp = P(openp)
    endp = endp and P(endp) or openp
    local upto_endp = (1 - endp)^1 
    return openp * C(upto_endp) * endp
end
tjdevries commented 3 years ago
function empty(p)
    return C(p)/''
end