
Hi all,
I need to get the comments associated with a particular node in the AST, but I can't find an easy way of doing it. For example, for the following file
Thanks in advance,
Jamie
I need to get the comments associated with a particular node in the AST, but I can't find an easy way of doing it. For example, for the following file
I need to be able to get the preceeding and trailing comments for each of these nodes. Any idea how I would go about this? It is important that we keep the comments associated with the correct code element, as we are re-ordering and reformatting the code and need to put the comments back where they should be. We need to be able to differentiate between preceeding and trailing comments.
Thanks in advance,
Jamie