hhatto / gocloc

A little fast cloc(Count Lines Of Code)
MIT License
803 stars 81 forks source link

Fix AnalyzeFile if comment is in the same line as code. #19

Closed kuba-- closed 5 years ago

kuba-- commented 5 years ago

Fixes https://github.com/hhatto/gocloc/issues/12

This PR modifies AnalyzeReader function (I believe it simplifies logic). It also fixes cases where multiline comment exists in the same line as code, e.g.:

var a /* a var */

var b /*
comment
*/