Closed ecstatic-morse closed 2 years ago
Yeah… we should’t be adding a real Rust parser here, but it makes sense to make heuristic more robust to the practical cases. Here, I think it makes sense to verify that symbols before ]]
are quote/hash and whotespace
we should’t be adding a real Rust parser here
@matklad Interesting. I thought this would be the solution. Is this just to avoid a syn
dependency? You could also go half way and write/steal a tokenizer for just string literals. I'll write the simple regex in the meantime. Maybe we can discuss on the PR.
The current code does a simple search for the character sequence
]]
to determine the end of anexpect![[
macro invocation. However,expect
takes a string, and "]]" is perfectly valid as part of a string.