Bug 121293 - Syntaxic coloration error in "switch" statement
Summary: Syntaxic coloration error in "switch" statement
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 2.4.1
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-02-03 16:05 UTC by patrick serru
Modified: 2006-07-14 11:28 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 patrick serru 2006-02-03 16:05:44 UTC
Version:           2.4.1 (using KDE 3.4.2 Level "b" , SUSE 10.0)
Compiler:          Target: x86_64-suse-linux
OS:                Linux (x86_64) release 2.6.13-15.7-default

Realy nice job you'v done.
Quite minor bug. Just try C following texte:
    switch (*sPtr) {
      case 0: break; // débugging
      case '@': case ' ': case'-': case '\n': case '_': case '.': break;
      default :
        if (*sPtr & 0x80) // Caractère ascii étendus sont autorisés...
            ;
          }
      }
and see the coloration of the case following "case ' ': "
Greet to the Kate dev team.
Comment 1 Christian Spiel 2006-05-19 11:49:26 UTC
This bug can be closed in my opinion because there is simply a missing space between the case keyword and '-'...
Comment 2 Andreas Kling 2006-07-13 23:12:07 UTC
Unfortunately, "case'-':" is still valid C code.
Comment 3 Matthew Woehlke 2006-07-14 01:05:50 UTC
Proposed patch:

==== c.xml
       <comment name="multiLine" start="/*" end="*/" />
     </comments>
-    <keywords casesensitive="1" />
+    <keywords casesensitive="1" additionalDeliminator="'&quot;" />
   </general>
 </language>
Comment 4 Dominik Haumann 2006-07-14 10:46:34 UTC
Patch looks correct, as the standard delimiters are:
\t.():!+,-<=>%&*/;?[]^{|}~\\ and space char.
" and ' are not included.

It can be committed imo, I believe it doesn't break other places.
Comment 5 Andreas Kling 2006-07-14 11:28:16 UTC
SVN commit 562193 by kling:

Fixed highlighting of "case'-':", which is ugly but allowed.
Thanks to Matthew Woehlke for the fix.

BUG: 121293


 M  +1 -1      c.xml  


--- branches/KDE/3.5/kdelibs/kate/data/c.xml #562192:562193
@@ -153,6 +153,6 @@
       <comment name="singleLine" start="//" />
       <comment name="multiLine" start="/*" end="*/" />
     </comments>
-    <keywords casesensitive="1" />
+    <keywords casesensitive="1" additionalDeliminator="'&quot;" />
   </general>
 </language>