cgag/loc

Nested comments not handled for Haskell or Rust files

Closed this issue · 2 comments

Cool tool! Just found it because sloccount refuses to work any more. This is far faster!

With the .rs file example here, tokei correctly reports 1 line of code, whereas loc incorrectly reports 14 lines of code.

Haskell also has nestable block comments:

{-

{-
Nested comment
-}

-- Note: still commented
fibs :: [Int]
fibs = 1 : 1 : zipWith (+) fibs (tail fibs)

-}

main :: IO ()
main = print [1..]

tokei correctly reports 2 lines of code, whereas loc incorrectly reports 5 lines.

cgag commented

should be good now, added this as a test file

Great, thanks!!