Skip to content

Commit

Permalink
Add Agda support (#116)
Browse files Browse the repository at this point in the history
Adding support for Agda, a dependently typed functional programming language and proof assistant.

Same syntax as Haskell regarding sloc.
  • Loading branch information
pnlph authored and flosse committed Jan 27, 2020
1 parent fdec614 commit bf8a9ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ var stats = window.sloc(sourceCode,"javascript");
## Supported languages

- Assembly
- Agda
- Brightscript
- C / C++
- C#
Expand Down
2 changes: 1 addition & 1 deletion spec/languages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ module.exports =
empty: 1
}
{
names: ["hs"]
names: ["hs", "agda"]
code:
"""
-- a
Expand Down
5 changes: 3 additions & 2 deletions src/sloc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ getCommentExpressions = (lang) ->
"hpp", "hx", "hxx", "ino", "java", "php", "php5", "go", "groovy", \
"scss", "less", "rs", "sass", "styl", "scala", "swift", "ts", \
"jade", "gs", "nut", "kt", "kts", "tsx", "fs", "fsi", "fsx", "bsl", \
"dart"
"dart", "agda"
/\/{2}/

when "latex", "tex", "sty", "cls"
Expand Down Expand Up @@ -81,7 +81,7 @@ getCommentExpressions = (lang) ->
when "js", "jsx", "mjs", "c", "cc", "cpp", "cs", "cxx", "h", "m", "mm", \
"hpp", "hx", "hxx", "ino", "java", "ls", "nix", "php", "php5", \
"go", "css", "sass", "scss", "less", "rs", "styl", "scala", "ts", \
"gs", "groovy", "nut", "kt", "kts", "tsx", "sql", "dart"
"gs", "groovy", "nut", "kt", "kts", "tsx", "sql", "dart", "agda"
start = /\/\*+/
stop = /\*\/{1}/

Expand Down Expand Up @@ -262,6 +262,7 @@ slocModule = (code, lang, opt={}) ->
{ total, source, comment, single, block, mixed, empty, todo, blockEmpty }

extensions = [
"agda"
"asm"
"brs"
"c"
Expand Down

0 comments on commit bf8a9ef

Please sign in to comment.