Commit graph

3 commits

Author SHA1 Message Date
Arne Welzel
85b8c8866b testing/btest/*zeek: Comment all @TEST lines 2025-04-17 16:30:23 +02:00
Vern Paxson
66c5bdbeac update test suite to avoid GH-2385 problems, including incorrect typing 2022-12-04 17:56:30 -08:00
Arne Welzel
203a309612 parse.y: Allow trailing commas for table, set, vector and record construction
Python, Ruby, Javascript, Go, ..., allow use of trailing commas and is even
recommended in some style-guides as it keeps diffs smaller. The black formatter
for Python even goes as far to take a trailing comma as an indication to
format a list one-item on a line.

It has been a bit unusual to not be able to put trailing commas in Zeek
scripts, so this change allows for it.

It explicitly prevents trailing commas in list expressions on the left
hand side. Concretely, this disallows trailing commas in the key list
expression during table initializations.

It probably allows for commas in more places that I haven't fully grasped.
Maybe we should tighten those down again if we find them surprising.
2022-12-01 12:05:29 +01:00