<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
Ruby already has this feature, and in my experience syntax highlighters handle it just fine.  Here's what vim's default highlighter shows me:<br>
<br>
<span style="font-family: "Courier New",monospace;"><strong>puts </strong><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><span style="color: rgb(255, 0, 0);"><strong>we can
</strong></span><span style="color: rgb(189, 19, 152);"><strong>#{</strong></span></span><br style="font-family: "Courier New",monospace;">
<span style="font-family: "Courier New",monospace;"><strong>    [</strong><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><span style="color: rgb(255, 0, 0);"><strong>include</strong></span><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><strong>,
</strong><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><span style="color: rgb(255, 0, 0);"><strong>interpolate</strong></span><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><strong>].each { |</strong><span style="color: rgb(117, 123, 128);"><strong>s</strong></span><strong>|
 puts s }</strong></span><br style="font-family: "Courier New",monospace;">
<span style="font-family: "Courier New",monospace;"><strong>                              .select { |</strong><span style="color: rgb(117, 123, 128);"><strong>s</strong></span><strong>| s.include?
</strong><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><span style="color: rgb(255, 0, 0);"><strong>erp</strong></span><span style="color: rgb(189, 19, 152);"><strong>"</strong></span><strong> }</strong></span><br style="font-family: "Courier New",monospace;">
<span style="font-family: "Courier New",monospace; color: rgb(0, 111, 201);"><span style="color: rgb(0, 111, 201);"><strong>#                              .first</strong></span></span><br style="font-family: "Courier New",monospace;">
<span style="font-family: "Courier New",monospace;"><span style="color: rgb(189, 19, 152);"><strong>}</strong></span><strong>
</strong><span style="color: rgb(255, 0, 0);"><strong>arbitrary expressions!</strong><span style="color: rgb(189, 19, 152);"><strong>"</strong></span></span></span><span style="color: rgb(255, 0, 0);"></span><br>
<br>
So an editor whose syntax highlighting is based on regular expressions already can't cope with the world as it is.  :)<br>
<br>
Does anyone reading this know of a tool that successfully highlights python but not ruby?<br>
<br>
ijs<br>
<br>
________________________________________<br>
From: Python-Dev <python-dev-bounces+ischwabacher=wisc.edu@python.org> on behalf of Greg Ewing <greg.ewing@canterbury.ac.nz><br>
Sent: Tuesday, August 11, 2015 18:34<br>
To: python-dev@python.org<br>
Subject: Re: [Python-Dev] PEP-498: Literal String Formatting<br>
<br>
Stefan Behnel wrote:<br>
> Syntax highlighting and in-string expression completion should eventually<br>
> help, once IDEs support it.<br>
<br>
Concerning that, this is going to place quite a<br>
burden on syntax highlighters. Doing it properly<br>
will require the ability to parse arbitrary Python<br>
expressions, or at least match nested brackets. An<br>
editor whose syntax hightlighting engine is based<br>
on regular expressions could have trouble with<br>
that.<br>
<br>
--<br>
Greg<br>
<br>
_______________________________________________<br>
Python-Dev mailing list<br>
Python-Dev@python.org<br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/ischwabacher%40wisc.edu" target="_blank">
https://mail.python.org/mailman/options/python-dev/ischwabacher%40wisc.edu</a><br>
</div>
</body>
</html>