Skip to content

Commit

Permalink
Other: Removed now useless trailing comment checks, see #640
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodeIO committed Jan 12, 2017
1 parent 3f6ffd0 commit c280a4a
Show file tree
Hide file tree
Showing 12 changed files with 17 additions and 39 deletions.
2 changes: 1 addition & 1 deletion dist/noparse/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/noparse/protobuf.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/noparse/protobuf.min.js.gz
Binary file not shown.
19 changes: 4 additions & 15 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

Binary file modified dist/protobuf.min.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/runtime/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/runtime/protobuf.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified dist/runtime/protobuf.min.js.gz
Binary file not shown.
17 changes: 3 additions & 14 deletions src/parse.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,9 @@ function parse(source, root, options) {
throw illegal(name, "name");
name = applyCase(name);
skip("=");
var line = tn.line(),
field = new Field(name, parseId(next()), type, rule, extend);
var field = new Field(name, parseId(next()), type, rule, extend);
field.comment = cmnt();
parseInlineOptions(field);
if (!field.comment) {
peek();
field.comment = cmnt(/* if on */ line);
}
// JSON defaults to packed=true if not set so we have to set packed=false explicity when
// parsing proto2 descriptors without the option, where applicable.
if (field.repeated && types.packed[type] !== undefined && !isProto3)
Expand Down Expand Up @@ -452,15 +447,9 @@ function parse(source, root, options) {

var name = token;
skip("=");
var value = parseId(next(), true),
comment = cmnt(),
line = tn.line();
parent.add(name, value, comment);
var value = parseId(next(), true);
parent.add(name, value, cmnt());
parseInlineOptions({}); // skips enum value options
if (!comment) {
peek();
parent.comments[name] = cmnt(/* if on */ line);
}
}

function parseOption(parent, token) {
Expand Down

0 comments on commit c280a4a

Please sign in to comment.