Something...

This commit is contained in:
Ognjen Milan Robovic 2023-09-18 15:38:04 -04:00
parent 6c15c79cc0
commit ac1729326c

View File

@ -145,6 +145,35 @@ static void highlight_cpp (void) {
highlighted = 1;
}
static void highlight_python (void) {
char * separators = ".,:<=>+-*/%!&~^?|()[]'\" \t\r\n";
char * keywords [35] = {
"False", "await", "else", "import", "pass", "None", "break", "except",
"in", "raise", "True", "class", "finally", "is", "return", "and",
"continue", "for", "lambda", "try", "as", "def", "from", "nonlocal",
"while", "assert", "del", "global", "not", "with", "async", "elif",
"if", "or", "yield"
};
if (highlighted != 0) {
syntax_delete ();
}
syntax_define_separators (separators);
syntax_define_default (COLOUR_RED, EFFECT_NORMAL, COLOUR_CYAN, EFFECT_BOLD);
syntax_define_range ("#", "\n", '\\', COLOUR_GREY, EFFECT_BOLD);
syntax_define_range ("'", "'", '\\', COLOUR_PINK, EFFECT_BOLD);
syntax_define_operators (".,:<=>+*-/%!&~^?|()[]", COLOUR_BLUE, EFFECT_BOLD);
syntax_define_words (keywords, 35, COLOUR_BLUE, EFFECT_NORMAL);
highlighted = 1;
}
int main (int argc, char * * argv) {
int offset = 0;
int select = 0;