zeek/testing/btest/Baseline/language.trailing-comma-2
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
..
.stderr parse.y: Allow trailing commas for table, set, vector and record construction 2022-12-01 12:05:29 +01:00
out parse.y: Allow trailing commas for table, set, vector and record construction 2022-12-01 12:05:29 +01:00