Is there a way to grab the source code in a comment block?
Closed this issue · 3 comments
normal1ze commented
Just trying to work out if there is a way to get the source code between an open comment and a closing one.
For example:
/**
* This is my code answer
* @param {string} name the name parameter
* @param {any} value the value of any type
*/
const thing = 'foo';
thing += ' bar';
/** End*/
Which will return the code between the configured open and end comment, so:
const thing = 'foo';
thing += ' bar';
syavorsky commented
Not as a part of the parser. But having list of the comment blocks with line numbers for opening/closing markers it should be possible to script something on top
normal1ze commented
Ah gotchya! Thats a good point, i'll give it a shot.
bryanjtc commented
@normal1ze Did you found a solution?