solidity-parser / parser

A Solidity parser for JS built on top of a robust ANTLR4 grammar
MIT License
157 stars 44 forks source link

Memory safe assembly blocks cause parse error #67

Closed patrickd- closed 2 years ago

patrickd- commented 2 years ago

Changing

-        assembly {
+        assembly ("memory-safe") {

as per https://docs.soliditylang.org/en/v0.8.13/assembly.html#memory-safety

will cause a parser error (in solhin):

  195:17  error  Parse error: extraneous input '(' expecting {'{', StringLiteralFragment}
  195:31  error  Parse error: extraneous input ')' expecting '{'
fvictorio commented 2 years ago

Hi @patrickd-, I'm pretty sure this is fixed in the latest version of the parser, so this should be an issue in the solhint repo about updating their dependency.

patrickd- commented 2 years ago

Hey @fvictorio, I don't think so, I forked solhint and upgraded the parser version to 0.14.1 and it still fails to parse

fvictorio commented 2 years ago

Oh, yes, sorry, that functionality is in the 0.14.2-beta.1 version.

fvictorio commented 2 years ago

I just published 0.14.2 as the latest version. Please let me know if that still doesn't work.

patrickd- commented 2 years ago

Oh, that was quick, I'll give it a try right away

patrickd- commented 2 years ago

That works, thanks!