ast icon indicating copy to clipboard operation
ast copied to clipboard

Can I get the specified method code block

Open JinCodeHub opened this issue 3 years ago • 3 comments

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

JinCodeHub avatar May 23 '22 08:05 JinCodeHub

Have you solved it?

C-wx avatar Feb 28 '23 13:02 C-wx

Hi @C-wx,

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

drieks avatar Feb 28 '23 21:02 drieks

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

C-wx avatar Mar 01 '23 02:03 C-wx