I am using ASTs to perform certain lint styled checking in addition to some static analysis and would like to understand how I can access whitespace and other such formatting tokens adjacent to AST nodes. I am currently using Eclipse JDT to generate the ASTs.
I am looking for mechanism in Eclipse JDT, equivalent to the channels mechanism provided by ANTLR; which generates parse trees and has separate channels for tokens streams (hidden channel and the parse tree channel) or a workaround to achieve the same.