I have .sol file and want to generate AST only from .sol file. My scenario is that at the command line (after installation some package), I just have to give a command like package_command --AST [from MyContract.sol] and that command gives me the output at the console or in the file. I have search a lot, but could not found any easy solution.

Is it possible to get/draw/print AST actual in tree form, not in JSON form? Kindly guide me with the easiest available options.

  • What do you mean by "tree form"? JSON is already a tree structure.
    – Morten
    Commented Sep 21, 2020 at 12:34
  • @Morten "tree form" means visually tree diagram .. not as presented in JSON form (key and value )
    – Amir Ali
    Commented Sep 22, 2020 at 7:32


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.