Sort out the parameters for QC style functions :)

This commit is contained in:
Bill Currie 2011-02-11 14:40:26 +09:00
parent 370f0b97ed
commit e19f7e3521
2 changed files with 3 additions and 2 deletions

View file

@ -79,6 +79,7 @@ typedef struct type_s {
typedef struct {
type_t *type;
struct param_s *params;
storage_class_t storage;
unsigned multi_type:1;
unsigned multi_store:1;

View file

@ -207,7 +207,6 @@ int yylex (void);
%{
function_t *current_func;
param_t *current_params;
class_type_t *current_class;
expr_t *local_expr;
vis_e current_visibility;
@ -313,6 +312,7 @@ external_def
$<spec>$ = $1; // copy spec bits and storage
$<spec>$.type = parse_params ($1.type, $2), st_global, 0;
$<spec>$.type = find_type ($<spec>$.type);
$<spec>$.params = $2;
}
function_def_list
| optional_specifiers function_decl function_body
@ -760,7 +760,7 @@ overloaded_identifier
: identifier
{
$$ = $1;
$$->params = current_params;
$$->params = $<spec>0.params;
$$->type = $<spec>0.type;
$$ = function_symbol ($$, $<spec>0.is_overload, 1);
}