Skip to content
Myr

Added all C and C++ keywords.

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Property404 · committed by antirez · parent 29aa777 · Browse files · 1 file+17 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+17 added−6 removed

  • other:+17 added−6 removed

1 file+17 added−6 removed

modified:kilo.c+17 added-6 removed
156 unmodified lines
157 *158 * There is no support to highlight patterns currently. */159160/* C / C++ */161char *C_HL_extensions[] = {".c",".cpp",NULL};161char *C_HL_extensions[] = {".c",".h",".cpp",".hpp",".cc",NULL};162char *C_HL_keywords[] = {163 /* A few C / C++ keywords */164 "switch","if","while","for","break","continue","return","else",165 "struct","union","typedef","static","enum","class",166 /* C types */163 /* C Keywords */164 "auto","break","case","continue","default","do","else","enum",165 "extern","for","goto","if","register","return","sizeof","static",166 "struct","switch","typedef","union","volatile","while","NULL",167168 /* C++ Keywords */169 "alignas","alignof","and","and_eq","asm","bitand","bitor","class",170 "compl","constexpr","const_cast","deltype","delete","dynamic_cast",171 "explicit","export","false","friend","inline","mutable","namespace",172 "new","noexcept","not","not_eq","nullptr","operator","or","or_eq",173 "private","protected","public","reinterpret_cast","static_assert",174 "static_cast","template","this","thread_local","throw","true","try",175 "typeid","typename","virtual","xor","xor_eq",176177 /* C types */178 "int|","long|","double|","float|","char|","unsigned|","signed|",168 "void|",NULL179 "void|","short|","auto|","const|","bool|",NULL180};181182/* Here we define an array of syntax highlights by extensions, keywords,183 * comments delimiters and flags. */
1100 unmodified lines