WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Extraneous space inserted after trailing comma #63

@bbannier

Description

@bbannier

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions