|
From: | Dmitry Gutov |
Subject: | bug#25529: diagnosis and one approach to a fix |
Date: | Mon, 6 Feb 2017 03:12:31 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.0 |
Hey Tom, On 05.02.2017 20:43, Tom Tromey wrote:
Tom> Another way is to use a regexp, see appended. Tom> I'll try to write a test for this soon. Now with a test.
This is very good, thank you. Here's just one example I've come so far that works with the old code, but not with yours:
let x = /[/]/;And that's probably just because the new js-syntax-propertize-regexp doesn't move point forward after matching (the current one leaves it after the closing slash), because the regexp in js-syntax-propertize is too primitive.
We could try to combine the regexps together, though. Then we'd move the syntax-ppss status check inside the rule for the opening delimiter, and use a simple one for the closer.
+ "Regular expression matching the body of a JavaScript regexp literal.")
Maybe remove "the body of". The regexp matches the delimiters as well. Thanks!
[Prev in Thread] | Current Thread | [Next in Thread] |