arguslab / Argus-SAF

Argus static analysis framework
Apache License 2.0
183 stars 49 forks source link

Implement AST visitor #33

Open fgwei opened 6 years ago

fgwei commented 6 years ago

I know this is awkward, but we currently does not have visitor for AST nodes. I like to navigate the tree by field access like fashion...

Anyway, visitor is needed in many case. You can also doing this to have more understanding of jawa AST.

fgwei commented 6 years ago

Assigned to @shivapbhusal

You can follow following steps to start with:

  1. Learn visitor pattern in scala with pattern matching if you don’t already know. One helper link: https://stackoverflow.com/questions/8618082/visitor-pattern-in-scala
  2. Fork the Argus-SAF GitHub.
  3. Clone your own version of the forked Git repo.
  4. Switch to develop branch.
  5. Add JawaVisitor.scala at package org.argus.jawa.ast
  6. Start your implementation.
  7. Add test cases to cover each line of code.
  8. When you finish, commit it with some message with “Fixed #33”.
  9. push to your forked GitHub repo.
  10. Do a pull request from your forked repo.
  11. I will review it.