Skip to content

Error when compiling non ES5 style function syntax #1829

@acode-x

Description

@acode-x

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() {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions