Escape backslash quotes in string in user defined language
-
Hi all,
I try to write a user defined language for Groovy (in fact just an improvement of one found on the web).Groovy’ strings delimiter can be either ’ (single quote) or " (double).
You can escape a single quote within a string delimited by single quotes.For example, you can have : ‘blah blah' blah blah’.
My problem is that the escaped quotes ' is always detected as end of the string.
So the last single quote is interpreted as the start of a new string which imply the highlighting is wrong for the reste of the file.Is there any way in a user defined language to exclude ' as string delimiter when ’ is a string delimiter ?
Thank you in adance for your help
-
In the UDL dialog, click the “Operators and Delimiters” tab. Under the caption “Delimiter 1” add the double quotation mark " as both “Open” and “Close”, the backslash as “Escape”. Same for the single quotation mark under “Delimiter 2”.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login