diff options
author | Property404 <daganboy@gmail.com> | 2016-07-10 18:37:41 -0400 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2020-07-02 12:26:05 +0200 |
commit | c1a27fa340cc8921a35971e442a0836781b1e923 (patch) | |
tree | f67b5ee72463f42f690c5c26f2890bc1d69bfc18 | |
parent | 29aa77781c5c7d00823bf8be2c4af51e453b575d (diff) | |
download | filo-c1a27fa340cc8921a35971e442a0836781b1e923.tar.gz filo-c1a27fa340cc8921a35971e442a0836781b1e923.zip |
Added all C and C++ keywords.
-rw-r--r-- | kilo.c | 23 |
1 files changed, 17 insertions, 6 deletions
@@ -158,14 +158,25 @@ void editorSetStatusMessage(const char *fmt, ...); * There is no support to highlight patterns currently. */ /* C / C++ */ -char *C_HL_extensions[] = {".c",".cpp",NULL}; +char *C_HL_extensions[] = {".c",".h",".cpp",".hpp",".cc",NULL}; char *C_HL_keywords[] = { - /* A few C / C++ keywords */ - "switch","if","while","for","break","continue","return","else", - "struct","union","typedef","static","enum","class", - /* C types */ + /* C Keywords */ + "auto","break","case","continue","default","do","else","enum", + "extern","for","goto","if","register","return","sizeof","static", + "struct","switch","typedef","union","volatile","while","NULL", + + /* C++ Keywords */ + "alignas","alignof","and","and_eq","asm","bitand","bitor","class", + "compl","constexpr","const_cast","deltype","delete","dynamic_cast", + "explicit","export","false","friend","inline","mutable","namespace", + "new","noexcept","not","not_eq","nullptr","operator","or","or_eq", + "private","protected","public","reinterpret_cast","static_assert", + "static_cast","template","this","thread_local","throw","true","try", + "typeid","typename","virtual","xor","xor_eq", + + /* C types */ "int|","long|","double|","float|","char|","unsigned|","signed|", - "void|",NULL + "void|","short|","auto|","const|","bool|",NULL }; /* Here we define an array of syntax highlights by extensions, keywords, |