eclipse-typescript icon indicating copy to clipboard operation
eclipse-typescript copied to clipboard

Regex syntax coloring not working anymore

Open mttcr opened this issue 10 years ago • 2 comments

Hello, Since the last update, the syntax coloring is not working anymore for regex patterns: image

mttcr avatar Jun 29 '15 07:06 mttcr

Hmm weird. That syntax coloring comes from the TypeScript language services so I'm not sure if there is much I can do to fix it but I'll take a look.

derekcicerone-zz avatar Jun 29 '15 16:06 derekcicerone-zz

The Eclipse plug-in uses one of the classification support capabilities from the TypeScript language services (its provided by the TypeScript team). The Eclipse plug-in uses the fastest classifier which can be called synchronously while typing but is not very sophisticated so it doesn't always return the best classifications. It looks like the regex classification now requires using the more expensive classifier:

        /// We do not have a full parser support to know when we should parse a regex or not
        /// If we consider every slash token to be a regex, we could be missing cases like "1/2/3", where
        /// we have a series of divide operator. this list allows us to be more accurate by ruling out
        /// locations where a regexp cannot exist.

Perhaps I could see if I could get to this over the winter break but if not it may be a while before we can fix this.

derekcicerone-zz avatar Dec 01 '15 02:12 derekcicerone-zz