Skip to content
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

Extraneous space inserted after trailing comma #63

Open
bbannier opened this issue Sep 21, 2023 · 0 comments
Open

Extraneous space inserted after trailing comma #63

bbannier opened this issue Sep 21, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bbannier
Copy link
Member

In many places Zeek allows trailing commas. This seems to be handled inconsistently.

For enums I see expected behavior:

type E: enum { a, b, c, };

For set-like constructs I see an additional space:

const s = { 1, 2, 3,  };
#                    ^

const r: RecordType = [ $a=1, $b=2, $c=3,  ];
#                                         ^

We probably have the same issue for function-like constructors, e.g.,

const a = vector(1, 2, 3, );
#                        ^

The issue seems to be that we insert an space after , in the contexts even though it is not followed by more arguments.

@bbannier bbannier added the bug Something isn't working label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant