Skip to content

Commit

Permalink
Version 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Power committed Aug 8, 2016
1 parent e44a0c7 commit d5fa7da
Show file tree
Hide file tree
Showing 9 changed files with 118 additions and 72 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ target
src/test
.settings
.commit_message
*.bk
*.bk
*.rustfmt
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ about: Count Code, Quickly.
author: Aaron P. <[email protected]>
bin_name: Tokei
name: Tokei
version: 4.0.0
version: 4.1.0
args:
- exclude:
help: Ignore all files & directories containing the word.
Expand Down
10 changes: 10 additions & 0 deletions src/lib/language/language_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ use self::LanguageType::*;
pub enum LanguageType {
/// ActionScript
ActionScript,
/// Ada
Ada,
/// Assembly
Assembly,
/// Autoconf
Expand Down Expand Up @@ -55,6 +57,8 @@ pub enum LanguageType {
DeviceTree,
/// Erlang
Erlang,
/// Forth
Forth,
/// FortranLegacy
FortranLegacy,
/// FortranModern
Expand Down Expand Up @@ -177,6 +181,7 @@ impl LanguageType {
pub fn name(&self) -> &'static str {
match *self {
ActionScript => "ActionScript",
Ada => "Ada",
Assembly => "Assembly",
Autoconf => "Autoconf",
Bash => "BASH",
Expand All @@ -197,6 +202,7 @@ impl LanguageType {
Dart => "Dart",
DeviceTree => "Device Tree",
Erlang => "Erlang",
Forth => "Forth",
FortranLegacy => "FORTRAN Legacy",
FortranModern => "FORTRAN Modern",
Go => "Go",
Expand Down Expand Up @@ -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),
Expand All @@ -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),
Expand Down Expand Up @@ -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,
Expand All @@ -372,6 +381,7 @@ impl From<String> for LanguageType {
"Dart" => Dart,
"DeviceTree" => DeviceTree,
"Erlang" => Erlang,
"Forth" => Forth,
"FortranLegacy" => FortranLegacy,
"FortranModern" => FortranModern,
"Go" => Go,
Expand Down
2 changes: 2 additions & 0 deletions src/lib/language/languages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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(),
Expand Down
18 changes: 9 additions & 9 deletions src/lib/lib.rs.in
Original file line number Diff line number Diff line change
@@ -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;
Loading

0 comments on commit d5fa7da

Please sign in to comment.