2023-08-23 21:37:40 -04:00
|
|
|
const char * c_keywords[] = {
|
|
|
|
"register", "volatile", "auto", "const", "static", "extern", "if", "else",
|
|
|
|
"do", "while", "for", "continue", "switch", "case", "default", "break",
|
|
|
|
"enum", "union", "struct", "typedef", "goto", "void", "return", "sizeof",
|
|
|
|
"char", "short", "int", "long", "signed", "unsigned", "float", "double",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
const char * preprocessor_keywords[] = {
|
|
|
|
"#include", "#pragma", "#define", "#undef", "#ifdef", "#ifndef", "#elifdef", "#elifndef",
|
|
|
|
"#if", "#elif", "#else", "#endif", "#embed", "#line", "#error", "#warning",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
2023-08-28 09:41:09 -04:00
|
|
|
new_char_tokens("+-&|.()[]{}", operator_hl);
|
|
|
|
new_keyword_tokens(c_keywords, control_hl);
|
|
|
|
new_keyword_tokens(preprocessor_keywords, special_hl);
|
|
|
|
new_region_token("/\\*", "\\*/", comment_hl);
|
|
|
|
new_region_token("//", "\\n", comment_hl);
|
|
|
|
new_region_token("\"", "\"", string_literal_hl);
|
|
|
|
new_region_token("<", ">", string_literal_hl);
|