Fixes unnamed protocols from templates
This commit is contained in:
parent
d0e23d42de
commit
9fe1d3ca8a
1 changed files with 4 additions and 2 deletions
|
@ -183,16 +183,18 @@ proto_name:
|
|||
}
|
||||
| FROM SYM {
|
||||
struct symbol *s = cf_default_name(this_proto->protocol->template, &this_proto->protocol->name_counter);
|
||||
s->class = this_proto->class;
|
||||
s->def = this_proto;
|
||||
this_proto->name = s->name;
|
||||
|
||||
if (($2->class != SYM_TEMPLATE) && ($2->class != SYM_PROTO)) cf_error("Template or protocol name expected");
|
||||
proto_copy_config(this_proto, $2->def);
|
||||
}
|
||||
| SYM FROM SYM {
|
||||
if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected");
|
||||
|
||||
cf_define_symbol($1, this_proto->class, this_proto);
|
||||
this_proto->name = $1->name;
|
||||
|
||||
if (($3->class != SYM_TEMPLATE) && ($3->class != SYM_PROTO)) cf_error("Template or protocol name expected");
|
||||
proto_copy_config(this_proto, $3->def);
|
||||
}
|
||||
;
|
||||
|
|
Loading…
Reference in a new issue