version 1.154, 2021/11/25 08:08:28 |
version 1.155, 2021/11/25 16:09:02 |
Line 450 cmp_keyword_by_name(const void *key, con |
|
Line 450 cmp_keyword_by_name(const void *key, con |
|
return strcmp(key, ((const struct keyword *)elem)->name); |
return strcmp(key, ((const struct keyword *)elem)->name); |
} |
} |
|
|
|
static bool |
|
probably_looking_at_definition(void) |
|
{ |
|
for (const char *p = inp_p(), *e = inp_line_end(); p < e;) |
|
if (*p++ == ')' && (*p == ';' || *p == ',')) |
|
return false; |
|
return true; |
|
} |
|
|
/* Read an alphanumeric token into 'token', or return lsym_eof. */ |
/* Read an alphanumeric token into 'token', or return lsym_eof. */ |
static lexer_symbol |
static lexer_symbol |
lexi_alnum(void) |
lexi_alnum(void) |
|
|
if (inp_peek() == '(' && ps.tos <= 1 && ps.ind_level == 0 && |
if (inp_peek() == '(' && ps.tos <= 1 && ps.ind_level == 0 && |
!ps.in_parameter_declaration && !ps.block_init) { |
!ps.in_parameter_declaration && !ps.block_init) { |
|
|
for (const char *p = inp_p(), *e = inp_line_end(); p < e;) |
if (probably_looking_at_definition()) { |
if (*p++ == ')' && (*p == ';' || *p == ',')) |
ps.is_function_definition = true; |
goto no_function_definition; |
if (ps.in_decl) |
|
ps.in_parameter_declaration = true; |
ps.is_function_definition = true; |
return lsym_funcname; |
if (ps.in_decl) |
} |
ps.in_parameter_declaration = true; |
|
return lsym_funcname; |
|
no_function_definition:; |
|
|
|
} else if (ps.p_l_follow == 0 && probably_typename()) { |
} else if (ps.p_l_follow == 0 && probably_typename()) { |
ps.next_unary = true; |
ps.next_unary = true; |