How can I access the abstract syntax tree for a generic function in Julia?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To recap: It looks like Simon was looking for the AST for a specific method associated with a generic function. We can get a
LambdaStaticDataobject, which contains the AST, for a specific method as follows:Apparently this AST can either be an Expr object or a compressed AST object, represented as a sequence of bytes:
The
show()method forLambdaStaticDatafrombase/show.jlillustrates how to decompress this, when encountered: