mirror of
https://github.com/zeek/zeek.git
synced 2025-10-13 12:08:20 +00:00
Change record field anonymous functions to use lambda expressions
There was an alternate syntax to assign anonymous functions to record fields that was never migrated to use the new lambda expression machinery (and so didn't allow referencing variables in outer scope): type myrec: record { foo: function(a: string); }; local o = "o"; local mr = myrec($foo(a: string) = { print a + o; });
This commit is contained in:
parent
66156b4eee
commit
f032885085
5 changed files with 40 additions and 35 deletions
|
@ -39,7 +39,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -134,7 +134,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -241,7 +241,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -468,7 +468,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -593,7 +593,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -718,7 +718,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -843,7 +843,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -968,7 +968,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -1198,7 +1198,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -1251,7 +1251,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -1304,7 +1304,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -1357,7 +1357,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -1410,7 +1410,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
@ -1463,7 +1463,7 @@ print A::outfile, Left;
|
|||
print A::outfile, A::left;
|
||||
print A::outfile, Right;
|
||||
print A::outfile, A::right;
|
||||
}, pred=anonymous-function
|
||||
}, pred=lambda_<10906653936191056190>
|
||||
{
|
||||
print A::outfile, ============PREDICATE============;
|
||||
print A::outfile, A::typ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue