mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18:20 +00:00
![]() Two parts to this: * Only allow vector slice assignment in statement contexts, not in arbitrary assignment expressions. E.g. it's not clear what the resulting value of `(v[1:2] = vector(1))` is for further expression chaining. For reference, Python doesn't allow it either. * Add a subclass of AssignExpr to specialize the behavior for index slice assignments (because its behavior regarding expression chaining is different per the previous point) and Unref the RHS of things like `v[1:2] = vector(1)` after IndexExpr::Assign is finished inserting it (since no one else takes ownership of it). Instead of using an Expr subclass, IndexSliceAssignExpr, we could use a proper Stmt, since that's the only context we currently use it for, but if we did ever to decide on allowing its use in arbitrary expression contexts, then I expect we'll need it this way anyway (just with a different IndexSliceAssignExpr::Eval implementation). |
||
---|---|---|
.. | ||
btest | ||
coverage | ||
external | ||
scripts | ||
.gitignore | ||
Makefile | ||
README |
This directory contains suites for testing for Zeek's correct operation: btest/ An ever-growing set of small unit tests testing Zeek's functionality. external/ A framework for downloading additional test sets that run more complex Zeek configuration on larger traces files. Due to their size, these are not included directly. See the README for more information. scripts/ Helpers scripts used by some tests.