Complying with the cpp API update
This commit is contained in:
parent
a180bb1c93
commit
ac2b97c6eb
@ -79,12 +79,13 @@ C99 * c99_new(C99Prefs const * prefs, char const * pathname)
|
|||||||
static Cpp * _new_cpp(C99Prefs const * prefs, char const * pathname)
|
static Cpp * _new_cpp(C99Prefs const * prefs, char const * pathname)
|
||||||
{
|
{
|
||||||
Cpp * cpp;
|
Cpp * cpp;
|
||||||
|
int filters = CPP_FILTER_TRIGRAPH | CPP_FILTER_WHITESPACE
|
||||||
|
| CPP_FILTER_COMMENT;
|
||||||
size_t i;
|
size_t i;
|
||||||
size_t j;
|
size_t j;
|
||||||
size_t k;
|
size_t k;
|
||||||
|
|
||||||
if((cpp = cpp_new(pathname, CPP_FILTER_TRIGRAPH
|
if((cpp = cpp_new(pathname, filters)) == NULL)
|
||||||
| CPP_FILTER_WHITESPACE)) == NULL)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
for(i = 0; i < prefs->paths_cnt; i++)
|
for(i = 0; i < prefs->paths_cnt; i++)
|
||||||
if(cpp_path_add(cpp, prefs->paths[i]) != 0)
|
if(cpp_path_add(cpp, prefs->paths[i]) != 0)
|
||||||
|
@ -37,7 +37,8 @@ static char * _tokens[C99_CODE_COUNT] =
|
|||||||
"[", "<=", "<", "(", "-=", "->", "-", "%=", "%", "!=", "!", "+=", "+",
|
"[", "<=", "<", "(", "-=", "->", "-", "%=", "%", "!=", "!", "+=", "+",
|
||||||
"?", "}", "]", ")", ";", "*=", "~", "*", "^=", "^",
|
"?", "}", "]", ")", ";", "*=", "~", "*", "^=", "^",
|
||||||
/* more codes */
|
/* more codes */
|
||||||
"'", "whitespace", "newline", "word", "constant", "identifier",
|
"'", "whitespace", "newline", "comment", "word", "constant",
|
||||||
|
"identifier",
|
||||||
/* keywords */
|
/* keywords */
|
||||||
"auto", "break", "case", "char", "const", "continue", "default", "do",
|
"auto", "break", "case", "char", "const", "continue", "default", "do",
|
||||||
"double", "else", "enum", "extern", "float", "for", "goto", "if",
|
"double", "else", "enum", "extern", "float", "for", "goto", "if",
|
||||||
|
Loading…
Reference in New Issue
Block a user