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 when compiling non ES5 style function syntax #1829

Closed
acode-x opened this issue Oct 27, 2022 · 0 comments
Closed

Error when compiling non ES5 style function syntax #1829

acode-x opened this issue Oct 27, 2022 · 0 comments

Comments

@acode-x
Copy link
Contributor

acode-x commented Oct 27, 2022

protobuf.js version: 7.1.2

Hi,

I am using duktape Javascript engine (ES5/5.1 compliant + few features ES6/7) along with protobuf.js.
I get the following error when compiling protobuf.js: SyntaxError: invalid object literal (line x)

This is due to the fact that duktape doesn’t understand the function syntax as below:

get() { return name; },

value() { return this.name + ": " + this.message; },

Would be great if we could follow a common syntax like in other protobuf.js files. Example:

int64: function read_int64() {

acode-x added a commit to acode-x/protobuf.js that referenced this issue Oct 27, 2022
alexander-fenster pushed a commit that referenced this issue Feb 2, 2023
@acode-x acode-x closed this as completed Feb 3, 2023
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

No branches or pull requests

1 participant