Add additional builtin exception types to rline

This commit is contained in:
K Lange 2021-03-27 22:02:01 +09:00
parent b2172af00a
commit ed5d03b001

9
src/vendor/rline.c vendored
View File

@ -563,9 +563,10 @@ char * syn_krk_special[] = {
};
char * syn_krk_exception[] = {
"TypeError","ArgumentError","IndexError","KeyError","AttributeError",
"NameError","ImportError","IOError","ValueError","KeyboardInterrupt",
"ZeroDivisionError","SyntaxError","Exception",
"Exception", "TypeError", "ArgumentError", "IndexError", "KeyError",
"AttributeError", "NameError", "ImportError", "IOError", "ValueError",
"KeyboardInterrupt", "ZeroDivisionError", "NotImplementedError", "SyntaxError",
"AssertionError",
NULL
};
@ -613,8 +614,6 @@ void paint_krk_string_shared(struct syntax_state * state, int type, int isFormat
continue;
} else if (lastchar() != '.' && find_keywords(state, syn_krk_types, FLAG_TYPE, c_keyword_qualifier)) {
continue;
} else if (find_keywords(state, syn_krk_keywords, FLAG_ESCAPE, c_keyword_qualifier)) {
continue;
} else if (find_keywords(state, syn_krk_exception, FLAG_PRAGMA, c_keyword_qualifier)) {
continue;
}