Fix token coloring logic for special cases; also cooler sunlight theme

master
Allen Webster 2020-05-01 12:09:38 -07:00
parent 4f579180c1
commit 6dd43762c4
2 changed files with 23 additions and 25 deletions

View File

@ -534,8 +534,8 @@ get_token_color_cpp(Token token){
{ {
color = defcolor_float_constant; color = defcolor_float_constant;
}break; }break;
default: }
{ // specifics override generals
switch (token.sub_kind){ switch (token.sub_kind){
case TokenCppKind_LiteralTrue: case TokenCppKind_LiteralTrue:
case TokenCppKind_LiteralFalse: case TokenCppKind_LiteralFalse:
@ -555,8 +555,6 @@ get_token_color_cpp(Token token){
color = defcolor_include; color = defcolor_include;
}break; }break;
} }
}break;
}
return(fcolor_id(color)); return(fcolor_id(color));
} }

View File

@ -16,12 +16,12 @@ defcolor_text_default = 0xFF47474F;
defcolor_comment = 0xFF953FFF; defcolor_comment = 0xFF953FFF;
defcolor_comment_pop = {0xFF00C030, 0xFFF00000}; defcolor_comment_pop = {0xFF00C030, 0xFFF00000};
defcolor_keyword = 0xFF002255; defcolor_keyword = 0xFF002255;
defcolor_str_constant = defcolor_keyword; defcolor_str_constant = 0xFFE820E0;
defcolor_char_constant = defcolor_str_constant; defcolor_char_constant = defcolor_str_constant;
defcolor_int_constant = defcolor_str_constant; defcolor_int_constant = 0xFF20E8E0;
defcolor_float_constant = defcolor_str_constant; defcolor_float_constant = defcolor_int_constant;
defcolor_bool_constant = defcolor_str_constant; defcolor_bool_constant = defcolor_int_constant;
defcolor_include = defcolor_str_constant; defcolor_include = 0xFFF010F0;
defcolor_preproc = 0xFF000000; defcolor_preproc = 0xFF000000;
defcolor_special_character = 0xFFFF00FF; defcolor_special_character = 0xFFFF00FF;
defcolor_ghost_character = 0xFF929292; defcolor_ghost_character = 0xFF929292;