kotlinx / ast

Generic AST parsing library for kotlin multiplatform
Apache License 2.0
325 stars 23 forks source link

Can I get the specified method code block #74

Open layxyer opened 2 years ago

layxyer commented 2 years ago

I used this tool to parse the kotlin source code, but I want to get the code block of each method parsed out for the inspection of method code changes

C-wx commented 1 year ago

Have you solved it?

drieks commented 1 year ago

Hi @C-wx,

parsing of method content is not implemented. you can access the "raw" AST, but there is no kotlinx.ast API.

C-wx commented 1 year ago

Thank you so much for your reply @drieks ! I should be able to identify the functionBody in the raw object and then identify the block statements to determine the two methods are equal