Introducing a meta token code

This commit is contained in:
Pierre Pronchery 2008-02-27 01:19:50 +00:00
parent 363b6feead
commit 44b41ba0ab
2 changed files with 3 additions and 1 deletions

View File

@ -32,6 +32,7 @@ typedef enum _CppCode
{
CPP_CODE_COMMA = 0,
CPP_CODE_DQUOTE,
CPP_CODE_META,
CPP_CODE_OPERATOR_AEQUALS,
CPP_CODE_OPERATOR_AMPERSAND,
CPP_CODE_OPERATOR_BAR,

View File

@ -412,7 +412,7 @@ static int _cpp_callback_comment(Parser * parser, Token * token, int c,
/* cpp_callback_directive */
static int _cpp_callback_directive(Parser * parser, Token * token, int c,
void * data)
/* FIXME actually parse and implement */
/* FIXME actually parse and implement, careful with comments */
{
CppParser * cp = data;
char * str = NULL;
@ -440,6 +440,7 @@ static int _cpp_callback_directive(Parser * parser, Token * token, int c,
}
while((c = parser_scan_filter(parser)) != '\n');
str[len] = '\0';
token_set_code(token, CPP_CODE_META);
token_set_string(token, str);
free(str);
return 0;