Open antico5 opened 1 year ago
Just noticed this might be a duplicate of #174
I did some investigation on this and here's what I could find:
solidity-parser
fails on the current contract text, then the request is aborted.greeter.greet
or greeter.greet(
), the parsing fails. But having greeter.greet()
, greeter.greet;
or greeter.greet(;
will produce a valid ast with the required MemberAccess node. If parenthesis auto-close is enabled, when the opening parenthesis is typed, the resulting text should be parseable and after analysis the request should be successful. Althought right now there's something wrong with the analyzer that it's not correctly loading the MemberAccess node in the graph even thought it's present on the ast.I think these are the required changes to have this feature working properly:
onSignatureHelp
to be async.Invoking analysis and making the onSignatureHelp
async both sound like good moves.
I suspect we will want to hold on this until we can pull in slang parser
to give us better parse results in the case of syntax errors.
This might have to do with the change of making analysis async.
Simple example:
Hint: when there's a semicolon at the end of the line, the signature help works