These are chat archives for pest-parser/pest

18th
Aug 2017
Laurent Wandrebeck
@lwandrebeck
Aug 18 2017 06:59
no \n, just "string" ( or 'string' or string btw)
(with backticks, that is)
DragoČ™ Tiselice
@dragostis
Aug 18 2017 08:07
Oh. Well, you can escape strings like in Rust, so "\"", "'", and "`".
Laurent Wandrebeck
@lwandrebeck
Aug 18 2017 08:28
descape = @{ "\\" ~ ("\"" | "\\") }
dquoted = @{ "\"" ~ (descape | !("\"" | "\\") ~ any)* ~ "\"" }
That way, I do get from input "string", how to get string instead ?
DragoČ™ Tiselice
@dragostis
Aug 18 2017 09:32
You could define string = { (descape | !("\"" | "\\") ~ any)* }.