Bug 151989 - sytax highlighting for D programming language: Escape sequences are recognized only outside from strings and not inside
Summary: sytax highlighting for D programming language: Escape sequences are recognize...
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: syntax (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-07 17:34 UTC by TITiAN
Modified: 2007-12-14 15:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TITiAN 2007-11-07 17:34:45 UTC
Version:           2.5.7 (using KDE KDE 3.5.7)
Installed from:    Debian testing/unstable Packages
OS:                Linux

With the sytax highlighting for the D programming language, escape sequences are recognized only outside from strings and not inside,

e.g in this line of D code
  writefln("blahblah\nanother line");
the escape sequece '\n' is not highlighted, while in this line (which is uncompilable, in this case)
  writefln("no escseq");\n
it is.

Now, in this piece of code
  writefln("Unknown argument \"",arg,"\"!");
  abc();
the function call "abc();" will be highlighted like a string, but it is not.
This happens because the program/library works it through like this:

  writefln("
 -> the first string begins [correct]

  Unknown argument \"
 -> the first string ends [incorrect]

  ",arg,"
 -> the second string begins and ends [working correctly]

  \"!
 -> no string begins as an escape sequence is designed for this [working correctly]

  ");
 -> another string begins that includes the rest of our code (which is the actual problem)
  abc();

I think, the solution is pretty simple.

btw, It works correctly with the C/C++-Highlighting.

           regards, TITiAN
Comment 1 Diggory Hardy 2007-11-14 17:48:35 UTC
I don't get those problems here. Could you check you're using the latest highlighting files please: http://bugs.kde.org/show_bug.cgi?id=147413
Grab the d.xml file from the last .tgz archive and the ddoc.xml file (latest upload); put them both in ~/.kde/share/apps/katepart/syntax and try again. The escape sequence colour isn't very obviously different from the string, but it is.
Comment 2 Thomas Friedrichsmeier 2007-12-14 15:36:16 UTC
Reproducible with version 1.36 of the D highlighting definition (shipped in KDE 3.5.8), but works correctly in version 1.44 (current in KDE 4 SVN). So this has been fixed in KDE 4. Closing.