mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-05-08 08:50:56 +00:00
Sort out the parameters for QC style functions :)
This commit is contained in:
parent
370f0b97ed
commit
e19f7e3521
2 changed files with 3 additions and 2 deletions
|
@ -79,6 +79,7 @@ typedef struct type_s {
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
type_t *type;
|
type_t *type;
|
||||||
|
struct param_s *params;
|
||||||
storage_class_t storage;
|
storage_class_t storage;
|
||||||
unsigned multi_type:1;
|
unsigned multi_type:1;
|
||||||
unsigned multi_store:1;
|
unsigned multi_store:1;
|
||||||
|
|
|
@ -207,7 +207,6 @@ int yylex (void);
|
||||||
%{
|
%{
|
||||||
|
|
||||||
function_t *current_func;
|
function_t *current_func;
|
||||||
param_t *current_params;
|
|
||||||
class_type_t *current_class;
|
class_type_t *current_class;
|
||||||
expr_t *local_expr;
|
expr_t *local_expr;
|
||||||
vis_e current_visibility;
|
vis_e current_visibility;
|
||||||
|
@ -313,6 +312,7 @@ external_def
|
||||||
$<spec>$ = $1; // copy spec bits and storage
|
$<spec>$ = $1; // copy spec bits and storage
|
||||||
$<spec>$.type = parse_params ($1.type, $2), st_global, 0;
|
$<spec>$.type = parse_params ($1.type, $2), st_global, 0;
|
||||||
$<spec>$.type = find_type ($<spec>$.type);
|
$<spec>$.type = find_type ($<spec>$.type);
|
||||||
|
$<spec>$.params = $2;
|
||||||
}
|
}
|
||||||
function_def_list
|
function_def_list
|
||||||
| optional_specifiers function_decl function_body
|
| optional_specifiers function_decl function_body
|
||||||
|
@ -760,7 +760,7 @@ overloaded_identifier
|
||||||
: identifier
|
: identifier
|
||||||
{
|
{
|
||||||
$$ = $1;
|
$$ = $1;
|
||||||
$$->params = current_params;
|
$$->params = $<spec>0.params;
|
||||||
$$->type = $<spec>0.type;
|
$$->type = $<spec>0.type;
|
||||||
$$ = function_symbol ($$, $<spec>0.is_overload, 1);
|
$$ = function_symbol ($$, $<spec>0.is_overload, 1);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue