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

Error with OPTION in enum #705

Closed
yagop opened this issue Mar 15, 2017 · 2 comments
Closed

Error with OPTION in enum #705

yagop opened this issue Mar 15, 2017 · 2 comments
Labels

Comments

@yagop
Copy link

yagop commented Mar 15, 2017

protobuf.js version: 6.6.5

Back in v5 I was able to use OPTION in an enum, upgrading to 6.6.5 it fails.

const protobuf = require("protobufjs");

const proto = `
package main;

enum myEnum {
 OPTION = 1;
}`;

const root = protobuf.parse(proto);
/tmp/tmp.4GW7nfOYst/node_modules/protobufjs/src/parse.js:492
            throw illegal(name, "name");
            ^

Error: illegal name '=' (line 5)
    at illegal (/tmp/tmp.4GW7nfOYst/node_modules/protobufjs/src/parse.js:101:16)
    at parseOption (/tmp/tmp.4GW7nfOYst/node_modules/protobufjs/src/parse.js:492:19)
    at parseEnum (/tmp/tmp.4GW7nfOYst/node_modules/protobufjs/src/parse.js:459:21)
    at parseCommon (/tmp/tmp.4GW7nfOYst/node_modules/protobufjs/src/parse.js:251:17)
    at Object.parse (/tmp/tmp.4GW7nfOYst/node_modules/protobufjs/src/parse.js:693:21)
    at Object.<anonymous> (/tmp/tmp.4GW7nfOYst/index.js:10:23)
    at Module._compile (module.js:571:32)
    at Object.Module._extensions..js (module.js:580:10)
    at Module.load (module.js:488:32)
    at tryModuleLoad (module.js:447:12)

@yagop yagop changed the title Error if OPTION in enum Error with OPTION in enum Mar 15, 2017
@dcodeIO dcodeIO added the bug label Mar 15, 2017
@dcodeIO
Copy link
Member

dcodeIO commented Mar 22, 2017

Should be fixed in master.

@dcodeIO dcodeIO closed this as completed Mar 22, 2017
@yagop
Copy link
Author

yagop commented Mar 24, 2017

Nice! 🎉 I can't wait till release hehehe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants