Skip to content

Commit

Permalink
Add Dart support (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgelesica-wf authored and flosse committed Dec 18, 2018
1 parent f9e094d commit fdec614
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ var stats = window.sloc(sourceCode,"javascript");
- CoffeeScript / IcedCoffeeScript
- Crystal
- CSS / SCSS / SASS / LESS / Stylus
- Dart
- Erlang
- F#
- Fortran
Expand Down
2 changes: 1 addition & 1 deletion spec/languages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports =
empty: 1
}
{
names: ["js", "jsx", "ts", "gs", "tsx"]
names: ["js", "jsx", "ts", "gs", "tsx", "dart"]
code:
"""
/* a */
Expand Down
6 changes: 4 additions & 2 deletions src/sloc.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ getCommentExpressions = (lang) ->
when "js", "jsx", "mjs", "c", "cc", "cpp", "cs", "cxx", "h", "m", "mm", \
"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"
"jade", "gs", "nut", "kt", "kts", "tsx", "fs", "fsi", "fsx", "bsl", \
"dart"
/\/{2}/

when "latex", "tex", "sty", "cls"
Expand Down Expand Up @@ -80,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"
"gs", "groovy", "nut", "kt", "kts", "tsx", "sql", "dart"
start = /\/\*+/
stop = /\*\/{1}/

Expand Down Expand Up @@ -274,6 +275,7 @@ extensions = [
"cs"
"css"
"cxx"
"dart"
"erl"
"f90"
"f95"
Expand Down

0 comments on commit fdec614

Please sign in to comment.