I'm writing a compiler of clike language in JS using Jison as an lexer/parser generator with angular frontend. I nearly got the result I expected, but there is one thing that is puzzling me - how to make Jison ignore comments (both /* block */
and // line
)?
Is there any easy way to achieve it? Keeping in mind that the comment can potentially be inserted in the middle of any statement/expression?