source code: https://github.com/AlexKnauth/syntax-sloc
procedure
( syntax-sloc stx)→natural-number/c
stx:syntax?
It does this by going through every syntax object within it, including every sub-expression, looking at the syntax-line of each one, and counting how many different lines are there.
>
3
procedure
( lang-file-sloc path-string)→natural-number/c
path-string:path-string?
>
>
>
14
>
105
procedure
path-string:path-string?
>
>
>
421
>
;;extisabytestringcontainingtheexpectedextension,withoutthedot316
105
procedure
( pkg-sloc name[#:use-file?use-file?])→natural-number/c
name:string?
The raco sloc command counts source lines of code in files or directories named on the command line and prints results. If an argument to raco sloc is not a #lang file or a directory, its line count is not computed.
--lang ‹lang-pregexp› — Only count lines for files whose #lang string exactly matches the ‹lang-pregexp› regular expression. For example --lang racket will match #lang racket and #!racket but not #lang racket/base or #lang sweet-exp racket.