Permalink
Browse files

Version 4.1.0

  • Loading branch information...
Aaron Power
Aaron Power committed Aug 8, 2016
1 parent e44a0c7 commit d5fa7da93719a6a6aee69909d058280219719af6
Showing with 118 additions and 72 deletions.
  1. +2 −1 .gitignore
  2. +10 −0 CHANGELOG.md
  3. +10 −10 Cargo.lock
  4. +1 −1 Cargo.toml
  5. +1 −1 cli.yml
  6. +10 −0 src/lib/language/language_type.rs
  7. +2 −0 src/lib/language/languages.rs
  8. +9 −9 src/lib/lib.rs.in
  9. +73 −50 src/lib/utils/fs.rs
View
@@ -2,4 +2,5 @@ target
src/test
.settings
.commit_message
*.bk
*.bk
*.rustfmt
View
@@ -1,3 +1,13 @@
# 4.1.0
Tokei is now **~40%** faster.
**Added languages**
- Ada
- Forth
# 4.0.0
Tokei now has a minimal version without `serde` for faster compilation.
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -8,7 +8,7 @@ license = "MIT/Apache-2.0"
name = "tokei"
readme = "README.md"
repository = "https://github.com/Aaronepower/tokei.git"
version = "4.0.0"
version = "4.1.0"
[[bin]]
doc = false
View
@@ -5,7 +5,7 @@ about: Count Code, Quickly.
author: Aaron P. <theaaronepower@gmail.com>
bin_name: Tokei
name: Tokei
version: 4.0.0
version: 4.1.0
args:
- exclude:
help: Ignore all files & directories containing the word.
@@ -15,6 +15,8 @@ use self::LanguageType::*;
pub enum LanguageType {
/// ActionScript
ActionScript,
/// Ada
Ada,
/// Assembly
Assembly,
/// Autoconf
@@ -55,6 +57,8 @@ pub enum LanguageType {
DeviceTree,
/// Erlang
Erlang,
/// Forth
Forth,
/// FortranLegacy
FortranLegacy,
/// FortranModern
@@ -177,6 +181,7 @@ impl LanguageType {
pub fn name(&self) -> &'static str {
match *self {
ActionScript => "ActionScript",
Ada => "Ada",
Assembly => "Assembly",
Autoconf => "Autoconf",
Bash => "BASH",
@@ -197,6 +202,7 @@ impl LanguageType {
Dart => "Dart",
DeviceTree => "Device Tree",
Erlang => "Erlang",
Forth => "Forth",
FortranLegacy => "FORTRAN Legacy",
FortranModern => "FORTRAN Modern",
Go => "Go",
@@ -266,6 +272,7 @@ impl LanguageType {
if let Some(extension) = get_extension(entry) {
match &*extension {
"as" => Some(ActionScript),
"ada" | "adb" | "ads" => Some(Ada),
"bash" | "sh" => Some(Bash),
"bat" | "btm" | "cmd" => Some(Batch),
"c" | "ec" | "pgc" => Some(C),
@@ -282,6 +289,7 @@ impl LanguageType {
"dts" | "dtsi" => Some(DeviceTree),
"el" | "lisp" | "lsp" => Some(Lisp),
"erl" | "hrl" => Some(Erlang),
"4th" | "forth" | "fr" | "frt" | "fth" | "f83" | "fb" | "fpm" | "e4" | "rx" | "ft" => Some(Forth),
"f" | "for" | "ftn" | "f77" | "pfo" => Some(FortranLegacy),
"f03" | "f08" | "f90" | "f95" => Some(FortranModern),
"go" => Some(Go),
@@ -352,6 +360,7 @@ impl From<String> for LanguageType {
fn from(from: String) -> Self {
match &*from {
"ActionScript" => ActionScript,
"Ada" => Ada,
"Assembly" => Assembly,
"Autoconf" => Autoconf,
"Bash" => Bash,
@@ -372,6 +381,7 @@ impl From<String> for LanguageType {
"Dart" => Dart,
"DeviceTree" => DeviceTree,
"Erlang" => Erlang,
"Forth" => Forth,
"FortranLegacy" => FortranLegacy,
"FortranModern" => FortranModern,
"Go" => Go,
@@ -274,6 +274,7 @@ impl Languages {
use super::LanguageType::*;
let map = btreemap! {
ActionScript => Language::new_c(),
Ada => Language::new_single(vec!["--"]),
Assembly => Language::new_single(vec![";"]),
Autoconf => Language::new_single(vec!["#", "dnl"]),
Bash => Language::new_hash(),
@@ -294,6 +295,7 @@ impl Languages {
Dart => Language::new_c(),
DeviceTree => Language::new_c(),
Erlang => Language::new_single(vec!["%"]),
Forth => Language::new(vec!["\\"], vec![("(", ")")]),
FortranLegacy => Language::new_single(vec!["c","C","!","*"]),
FortranModern => Language::new_single(vec!["!"]),
Go => Language::new_c(),
View
@@ -1,9 +1,9 @@
#[macro_use]
mod utils;
mod language;
mod stats;
mod sort;
pub use language::{LanguageType, Languages, Language};
pub use stats::Stats;
pub use sort::Sort;
#[macro_use]
mod utils;
mod language;
mod stats;
mod sort;
pub use language::{LanguageType, Languages, Language};
pub use stats::Stats;
pub use sort::Sort;
Oops, something went wrong.

0 comments on commit d5fa7da

Please sign in to comment.