-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@if block parsing problem when located within lambda return value #2075
Comments
This appears to be fixable via the following hunk, but not sure #2289 is that easy, too.
|
@awelzel will that change really work? The |
I will take a closer look tomorrow. I added a btest with above example and it seemed to work. Will double check and get back to you. Thanks for looking. |
@vpax - the example of this ticket involves a lamda returning a lambda. It's the The proposed fix is similar to what we do for func_hdr / func_body: Lines 1401 to 1406 in fad18cb
I've opened a PR, please chime in if I misunderstood or you have further concerns/thoughts. Thanks! |
@awelzel I see. Given that change, does the snippet at the top now work correctly? |
Yep. I've added it here as a test-case: |
Great! |
I tried making some script-code backwards compatible and notices that this code...
Throws the following error when run with a current master version of Zeek:
I think that this is supposed to work fine - but someone please correct me if I am incorrect. One can work around this problem by changing the placement of the
{
after the return statement.The text was updated successfully, but these errors were encountered: