Patch #884 2006-03-02 19:26

sethjackson

CSS lexer
Download
884-CSS_lexer.patch (6.0 KB)
Category
Lexer
Status
Accepted
Close date
2006-03-07 09:08
Assigned to
 
Index: src/sdk/resources/lexers/lexer_css.xml
===================================================================
--- src/sdk/resources/lexers/lexer_css.xml    (revision 2143)
+++ src/sdk/resources/lexers/lexer_css.xml    (working copy)
@@ -18,19 +18,19 @@
                 <Style name="Class"
                         index="2"
                         fg="0,0,0"/>
-                <Style name="Pseudo Class"
+                <Style name="Pseudo class"
                         index="3"
                         fg="128,0,0"/>
-                <Style name="Unknown Pseudo Class"
+                <Style name="Unknown Pseudo class"
                         index="4"
                         fg="255,0,0"/>
                 <Style name="Operator"
                         index="5"
                         fg="0,0,0"/>
-                <Style name="CSS1 Identifier"
+                <Style name="CSS1 property"
                         index="6"
                         fg="0,64,224"/>
-                <Style name="Unknown Identifier"
+                <Style name="Unknown property"
                         index="7"
                         fg="255,0,0"/>
                 <Style name="Value"
@@ -39,7 +39,7 @@
                 <Style name="Comment"
                         index="9"
                         fg="0,128,0"/>
-                <Style name="ID"
+                <Style name="ID selector"
                         index="10"
                         fg="0,128,128"/>
                 <Style name="Important"
@@ -50,13 +50,13 @@
                         index="12"
                         fg="128,128,0"
                         bold="1"/>
-                <Style name="Double String"
+                <Style name="Double quote string"
                         index="13"
                         fg="128,0,128"/>
-                <Style name="Single String"
+                <Style name="Single quote string"
                         index="14"
                         fg="128,0,128"/>
-                <Style name="CSS2 Identifier"
+                <Style name="CSS2 property"
                         index="15"
                         fg="0,160,224"/>
                 <Style name="Attribute"
@@ -100,45 +100,6 @@
                                    pause cue-before cue-after cue play-during azimuth elevation
                                    speech-rate voice-family pitch pitch-range stress richness
                                    speak-punctuation speak-numeral"/>
-                        <!-- CSS1 Values -->
-                        <Set index="3"
-                            value="auto none normal italic oblique small-caps bold bolder lighter
-                                   xx-small x-small small medium large x-large xx-large larger
-                                   smaller transparent repeat repeat-x repeat-y no-repeat scroll
-                                   fixed top bottom left center right justify both underline overline
-                                   line-through blink baseline sub super text-top middle text-bottom
-                                   capitalize uppercase lowercase thin medium thick dotted dashed
-                                   solid double groove ridge inset outset block inline list-item pre
-                                   no-wrap inside outside disc circle square decimal lower-roman
-                                   upper-roman lower-alpha upper-alpha aqua black blue fuchsia gray
-                                   green lime maroon navy olive purple red silver
-                                   teal white yellow"/>
-                        <!-- CSS2 Values -->
-                        <Set index="4"
-                            value="inherit run-in compact marker table inline-table table-row-group
-                                   table-header-group table-footer-group table-row table-column-group
-                                   table-column table-cell table-caption static relative absolute
-                                   fixed ltr rtl embed bidi-override visible hidden scroll collapse
-                                   open-quote close-quote no-open-quote no-close-quote
-                                   decimal-leading-zero lower-greek lower-latin upper-latin hebrew
-                                   armenian georgian cjk-ideographic hiragana katakana
-                                   hiragana-iroha katakana-iroha landscape portrait crop cross always
-                                   avoid wider narrower ultra-condensed extra-condensed condensed
-                                   semi-condensed semi-expanded expanded extra-expanded
-                                   ultra-expanded caption icon menu message-box small-caption
-                                   status-bar separate show hide once crosshair default pointer
-                                   move text wait help e-resize ne-resize nw-resize n-resize
-
download for full patch...
mandrav 2006-03-03 09:08

This patch seems to only remove things, instead of updating.

Are you sure it's what you intended?

sethjackson 2006-03-03 17:35

Yes absolutely! I looked at the css.properties file that came with SciTE, and it fooled me. I should have looked at the C::B wiki first. :P There are only three keywords lists for the CSS lexer as can be seen by looking at LexCSS.cxx in the wxScintilla sources.

static const char * const cssWordListDesc[] = {

"CSS1 Keywords",

"Pseudo classes",

"CSS2 Keywords",

0

};

So yes. The CSS lexer works just fine becuase the stuff I removed is not even used by the CSS lexer.

sethjackson 2006-03-03 17:37

BTW can you devs see my initial comments or not? I never can. Ex: I submit a patch and my comment that tells what it does is gone (I can't see it at least). :P

mandrav 2006-03-06 17:24

Patch fails to apply in current revision...

sethjackson 2006-03-06 17:44

Hmm odd. This should fix it.