mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 18:18:19 +00:00
Allow named table constructors. Addresses #983.
This commit is contained in:
parent
29740d3d6e
commit
bcf5c41786
5 changed files with 117 additions and 14 deletions
|
@ -545,16 +545,15 @@ expr:
|
|||
case TYPE_RECORD:
|
||||
$$ = new RecordConstructorExpr($4, ctor_type);
|
||||
break;
|
||||
|
||||
case TYPE_TABLE:
|
||||
if ( ctor_type->IsTable() )
|
||||
{
|
||||
$1->Error("constructor type not implemented");
|
||||
YYERROR;
|
||||
}
|
||||
$$ = new TableConstructorExpr($4, 0, ctor_type);
|
||||
else
|
||||
$$ = new SetConstructorExpr($4, 0, ctor_type);
|
||||
|
||||
break;
|
||||
|
||||
case TYPE_VECTOR:
|
||||
default:
|
||||
$1->Error("constructor type not implemented");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue