Closed area closed 8 years ago
solved in v1.0.13
Thanks for pointing this out =)
I'm afraid v1.0.13 still doesn't work for me. I have to remove EOS_NO_SEMICOLON from the EnumDeclaration statement and rebuild to get a contract with an enum to parse correctly.
My interpretation is:
enum Foo {bar, baz}
and
contract Lorem {
enum Foo {bar, baz}
}
should be correctly parsed by solparse. But the parser should throw an error if we append a semicolon in the end like
enum Foo {bar, baz};
Currently, v1.0.13 is doing this as expected (I tried it on other machines)
Could you paste your solidity code that didn't get parsed correctly and tell me what you expected vs. what you got?
Trying to parse the contract
contract Lorem{
enum Foo {bar, baz}
bytes32 x;
}
fails with
throw e;
^
SyntaxError: Expected "/*", "//", comment, end of line or whitespace but "b" found. Line: 4, Column: 4
I've published v1.0.15. Though it needs more testing, it should solve the problem we've discussed. But let me know if it doesn't work out
This now works for me, so I'm happy for this to be closed unless you want it left open to remind you about the further testing.
awesome! I'm keeping it open for testing reminder:)
Invalid, and currently parsed as correct:
enum { Test1, Test2 };
Valid:
enum { Test1, Test2 }
This can be seen by simply trying to compile a contract containing an enum with
solc
.