Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Wrong command name in README and bug on diagram generation #7

Open
nkthiebaut opened this issue Oct 2, 2018 · 4 comments
Open

Wrong command name in README and bug on diagram generation #7

nkthiebaut opened this issue Oct 2, 2018 · 4 comments

Comments

@nkthiebaut
Copy link

Hi,

First there's a typo in the README, the command is not solidity-code-gen but solidity-diagram-gen.

Plus, when I run solidity-diagram-gen ./contract on my contract folder (the folder I use is the contract folder of this repo) I get the following bug

Generating diagram...

/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/index.js:39
      throw e;
      ^
SyntaxError: Expected "!", "!=", "(", "+", "++", "-", "--", "0", "<", "<=", "==", ">", ">=", "[", "^", "delete", "false", "hex", "mapping", "new", "this", "true", "v", "~", [1-9], comment, end of line, identifier, number, string, or whitespace but "," found. Line: 55, Column: 6
    at peg$buildStructuredError (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/build/parser.js:1306:12)
    at Object.peg$parse [as parse] (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/build/parser.js:14485:11)
    at Object.parse (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/index.js:34:23)
    at Object.parseFile (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/index.js:45:17)
    at /usr/local/lib/node_modules/solidity-diagram-gen/src/solidity-diagram-gen.js:22:42
    at Array.forEach (<anonymous>)
    at processSolFiles (/usr/local/lib/node_modules/solidity-diagram-gen/src/solidity-diagram-gen.js:21:15)
    at Walker.klaw.on.on (/usr/local/lib/node_modules/solidity-diagram-gen/src/solidity-diagram-gen.js:407:30)
    at Walker.emit (events.js:182:13)
    at endReadableNT (_stream_readable.js:1092:12)
@nkthiebaut
Copy link
Author

I found that the line responsible for this bug is the following: (,,,,,,,,,kittyDna) = kittyContract.getKitty(_kittyId); which is a valid solidity syntax.

@richard-ramos
Copy link
Owner

Hello, @nkthiebaut
Thanks for noticing the typo. #6 fixed this.
The bug reported occurs inside the solidity-diagram-gen npm module. I'll attempt to solve it.

@notOccupanther
Copy link

Receiving the same error when I try to run it. Is there a fix for this ? Would love to try this out

@doraemon93
Copy link

Hi,

First there's a typo in the README, the command is not solidity-code-gen but solidity-diagram-gen.

Plus, when I run solidity-diagram-gen ./contract on my contract folder (the folder I use is the contract folder of this repo) I get the following bug

Generating diagram...

/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/index.js:39
      throw e;
      ^
SyntaxError: Expected "!", "!=", "(", "+", "++", "-", "--", "0", "<", "<=", "==", ">", ">=", "[", "^", "delete", "false", "hex", "mapping", "new", "this", "true", "v", "~", [1-9], comment, end of line, identifier, number, string, or whitespace but "," found. Line: 55, Column: 6
    at peg$buildStructuredError (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/build/parser.js:1306:12)
    at Object.peg$parse [as parse] (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/build/parser.js:14485:11)
    at Object.parse (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/index.js:34:23)
    at Object.parseFile (/usr/local/lib/node_modules/solidity-diagram-gen/node_modules/solidity-parser/index.js:45:17)
    at /usr/local/lib/node_modules/solidity-diagram-gen/src/solidity-diagram-gen.js:22:42
    at Array.forEach (<anonymous>)
    at processSolFiles (/usr/local/lib/node_modules/solidity-diagram-gen/src/solidity-diagram-gen.js:21:15)
    at Walker.klaw.on.on (/usr/local/lib/node_modules/solidity-diagram-gen/src/solidity-diagram-gen.js:407:30)
    at Walker.emit (events.js:182:13)
    at endReadableNT (_stream_readable.js:1092:12)

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

No branches or pull requests

5 participants
@richard-ramos @nkthiebaut @notOccupanther @doraemon93 and others