cgag / loc

Count lines of code quickly.
MIT License
2.31k stars 125 forks source link

Nested comments not handled for Haskell or Rust files #83

Closed mgsloan closed 6 years ago

mgsloan commented 6 years ago

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 6 years ago

should be good now, added this as a test file

mgsloan commented 6 years ago

Great, thanks!!