Re: Syncolor errors in 4.1 Linux 64-bit

new topic     » goto parent     » topic index » view thread      » older message » newer message
SDPringle said...

I have just tried this with 4.1 (Alternative Literals Branch) 32-bit Windows. Same problem. I cannot see the back tick in ed.ex.

Shawn

Have you tried hitting two back ticks in a row?

Obviously, this isn't the smartest way to handle errors from the tokenizer, but this can be worked around with the following patch: (note that the entire line will lose colour, however)

--- a/include/euphoria/syncolor.e 
+++ b/include/euphoria/syncolor.e 
@@ -178,6 +178,9 @@ 
 
        line = tokenize:tokenize_string(pline, token) 
        -- TODO error checking? 
+       if line[2] != 0 then 
+               return append(color_segments, {NORMAL_COLOR, pline}) 
+       end if 
        line = line[1] 
        current_color = DONT_CARE 
        seg = 1 
@@ -197,7 +200,7 @@ 
                        seg_flush(KEYWORD_COLOR) 
 
                elsif class = tokenize:T_BUILTIN then 
-                       seg_flush(KEYWORD_COLOR) 
+                       seg_flush(BUILTIN_COLOR) 
 
                elsif class = tokenize:T_IDENTIFIER then 
                        seg_flush(NORMAL_COLOR) 
new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu