Skip to content

Allow empty statements#1051

Closed
benesch wants to merge 1 commit intoprotobufjs:masterfrom
benesch:semis
Closed

Allow empty statements#1051
benesch wants to merge 1 commit intoprotobufjs:masterfrom
benesch:semis

Conversation

@benesch
Copy link
Copy Markdown

@benesch benesch commented May 23, 2018

The protobuf language specification (0) allows empty statements to
appear in several places. For example, the following protobuf is
well-formed and is accepted by protoc, but was previously rejected by
pbjs:

message A {
  string a = 1;;
}

Support empty statements by ignoring them.

The protobuf language specification [0] allows empty statements to
appear in several places. For example, the following protobuf is
well-formed and is accepted by protoc, but was previously rejected by
pbjs:

    message A {
      string a = 1;;
    }

Support empty statements by ignoring them.

[0]: https://developers.google.com/protocol-buffers/docs/reference/proto2-spec#message_definition
@SlyryD
Copy link
Copy Markdown
Contributor

SlyryD commented May 24, 2018

Should probably add tests to make sure empty statements don't occur in places they shouldn't:

message ; A {
  string a = 1;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants