On 03/25/2011 12:08 PM, Regan Heath wrote:
On Wed, 23 Mar 2011 21:16:02 -0000, Jonathan M Davis <jmdavisp...@gmx.com> 
wrote:
There are tasks for which you need to be able to lex and parse D code. To
100% correctly remove unit tests would be one such task.

Is that last bit true? You definitely need to be able to lex it, but instead of
actually parsing it you just count { and } and remove 'unittest' plus { plus }
plus everything in between right?

At first sight, you're both wrong: you'd need to count { } levels. Also, I think true lexing is not really needed: you'd only need to put apart strings and comments that could hold non-code { & }.
(But these are only very superficial notes.)

Denis
--
_________________
vita es estrany
spir.wikidot.com

Reply via email to