Introducing a meta token code
This commit is contained in:
parent
363b6feead
commit
44b41ba0ab
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user