Subject: diagnosis and one approach to a fix

From: Tom Tromey <[email-masked]>
Date: Sat, 04 Feb 2017 22:37:29 -0700

I think the problem here is that js-syntax-propertize-regexp is using
parse-partial-sexp to try to parse the regexp literal.  However, this
gets confused by the construct [^[], because it thinks that the brackets
aren't matched.

I don't think there is a way to teach parse-partial-sexp that "^" is a
quote only in this one specific instance.

One possible fix here would be to change this function to do a simple
parse of the regexp literal.  I think it would only really have to
handle parsing bracket syntax and looking for the terminating "/".  The
current code also looks for balanced parens, but I don't think this is
actually needed.

Tom