Coder Social home page Coder Social logo

Comments (4)

vovak avatar vovak commented on May 29, 2024 1

Hi, here is a minimal example of traversing the tree to extract metadata. I'm sure you can take it from here.

https://github.com/vovak/astminer-examples/tree/master/method-features

from astminer.

vovak avatar vovak commented on May 29, 2024

Hi @ceceu,

Yes.
You would need to use astminer as a library and write a bit of code in Kotlin or Java to parse your input using one of the Parser implementations in astminer and then extract this information by traversing the resulting tree. Please let me know if you need help with that.

By the way, why does the return_statement field only contain the second of the two return statements?

from astminer.

celsofranssa avatar celsofranssa commented on May 29, 2024

Hello @vovak,
great to know that I can use astminer to extract metadata.
If I am not asking for too much, a java code showing how to do it would be of great help.

Editing note: I adjusted the example so that the return_statement includes all existing return statements.

from astminer.

celsofranssa avatar celsofranssa commented on May 29, 2024

These examples were of great help to me.
Thank you @vovak !

from astminer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.