Weird trait problem

This commit is contained in:
Aaronepower 2016-08-01 09:53:09 +01:00
parent c0c916beab
commit b2790c4eee
5 changed files with 201 additions and 210 deletions

176
Cargo.lock generated
View file

@ -2,32 +2,31 @@
name = "tokei"
version = "3.0.2"
dependencies = [
"clap 2.5.2 (registry+https://github.com/rust-lang/crates.io-index)",
"clap 2.10.0 (registry+https://github.com/rust-lang/crates.io-index)",
"glob 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
"maplit 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rayon 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_cbor 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_codegen 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serializable_enum 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_codegen 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_yaml 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.1.30 (registry+https://github.com/rust-lang/crates.io-index)",
"walkdir 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "ansi_term"
version = "0.7.2"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "aster"
version = "0.18.0"
version = "0.22.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_syntax 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -35,6 +34,11 @@ name = "bitflags"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "bitflags"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "byteorder"
version = "0.3.13"
@ -42,13 +46,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "clap"
version = "2.5.2"
version = "2.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"ansi_term 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"ansi_term 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"bitflags 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"strsim 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"term_size 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-width 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)",
"vec_map 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
@ -62,23 +67,33 @@ dependencies = [
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "dtoa"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "glob"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "itoa"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "kernel32-sys"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi-build 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "libc"
version = "0.2.12"
version = "0.2.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -93,33 +108,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num-traits"
version = "0.1.32"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "num_cpus"
version = "0.2.12"
version = "0.2.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quasi"
version = "0.12.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_syntax 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_errors 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "quasi_codegen"
version = "0.12.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aster 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"aster 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_errors 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -127,16 +144,16 @@ name = "rand"
version = "0.3.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "rayon"
version = "0.3.1"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"deque 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"num_cpus 0.2.13 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
@ -147,7 +164,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "0.7.10"
version = "0.7.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "serde"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
@ -156,47 +178,51 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byteorder 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_codegen"
version = "0.7.10"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"aster 0.18.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi_codegen 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"aster 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
"quasi_codegen 0.16.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_codegen_internals 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_codegen_internals"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_errors 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_json"
version = "0.7.1"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"num-traits 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"dtoa 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.1.34 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serde_yaml"
version = "0.2.5"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
"yaml-rust 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "serializable_enum"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "strsim"
version = "0.4.1"
@ -204,32 +230,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "syntex"
version = "0.35.0"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"syntex_syntax 0.35.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_errors 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_syntax 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syntex_errors"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_pos 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syntex_pos"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "syntex_syntax"
version = "0.35.0"
version = "0.39.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"bitflags 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_errors 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syntex_pos 0.39.0 (registry+https://github.com/rust-lang/crates.io-index)",
"term 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
"unicode-xid 0.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term"
version = "0.2.14"
version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "term_size"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"libc 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -237,7 +295,7 @@ name = "toml"
version = "0.1.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"serde 0.7.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
@ -261,12 +319,12 @@ version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"kernel32-sys 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
"winapi 0.2.8 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "winapi"
version = "0.2.7"
version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]

View file

@ -1,67 +1,71 @@
# Copyright (c) 2015 Aaron Power
# Use of this source code is governed by the MIT/APACHE2.0 license that can be
# found in the LICENCE-{APACHE, MIT} file.
[package]
name = "tokei"
version = "3.0.2"
authors = ["Aaronepower <theaaronepower@gmail.com>"]
repository = "https://github.com/Aaronepower/tokei.git"
homepage = "https://aaronepower.github.io/tokei/"
license = "MIT/Apache-2.0"
readme = "README.md"
description = "Count code, quickly."
build = "src/lib/build.rs"
description = "Count code, quickly."
homepage = "https://aaronepower.github.io/tokei/"
include = ["src/**/*", "cli.yml", "Cargo.toml", "LICENCE-APACHE.md", "LICENCE-MIT.md"]
[lib]
license = "MIT/Apache-2.0"
name = "tokei"
path = "src/lib/lib.rs"
readme = "README.md"
repository = "https://github.com/Aaronepower/tokei.git"
version = "3.0.2"
[[bin]]
doc = false
name = "tokei"
path = "src/main.rs"
doc = false
[features]
default = []
io = ["serde_codegen", "serde", "serializable_enum"]
json = ["io", "serde_json"]
cbor = ["io", "rustc-serialize","serde_cbor"]
toml-io = ["io", "toml/serde"]
yaml = ["io", "serde_yaml"]
all = ["json", "cbor", "toml-io", "yaml"]
# For building serde in stable.
[build-dependencies]
serde_codegen = {version = "0.7.10", optional = true}
# Dependencies, and why they are used.
# - Clap: For CLI argument parsing.
# - Glob: When a user passes in a ./*.rs path.
# - Maplit: Cleaner initialization of the language map.
# - Rayon: Parallelization of language analysation.
# - Rustc-serialize: Converting String to hex, for CBOR.
# - Serde: Converting Language struct to other formats.
# - Serde_cbor: To CBOR. http://cbor.io/
# - Serde_json: To JSON. http://json.org/
# - Serde_yaml: To YAML. http://yaml.org/
# - serializable_enum: To fix a dumb change in behaviour in serde, hopefully to be removed next release. https://github.com/serde-rs/serde/issues/251
# - Toml: To TOML https://github.com/toml-lang/toml
# - Walkdir: Handling recursively reading directories across Windows, OSX, and UNIX.
[build-dependencies.serde_codegen]
optional = true
version = "0.8.0"
[dependencies]
clap = {version = "2.5.1", features = ["yaml"]}
glob = "0.2.11"
maplit = "0.1.3"
rayon = "0.3.1"
rustc-serialize = { version = "0.3.19", optional = true }
serde = { version = "0.7.10", optional = true }
serde_cbor = {version = "0.3.3", optional = true }
serde_json = { version = "0.7.1", optional = true }
serde_yaml = { version = "0.2.5", optional = true }
serializable_enum = { version = "0.3.0", optional = true }
walkdir = "0.1.5"
glob = "~0.2.11"
maplit = "~0.1.3"
rayon = "~0.4.0"
walkdir = "~0.1.5"
[dependencies.clap]
version = "~2.10.0"
features = ["yaml"]
[dependencies.rustc-serialize]
optional = true
version = "~0.3.19"
[dependencies.serde]
optional = true
version = "~0.8.0"
[dependencies.serde_cbor]
optional = true
version = "~0.3.3"
[dependencies.serde_json]
optional = true
version = "~0.8.0"
[dependencies.serde_yaml]
optional = true
version = "~0.4.0"
[dependencies.toml]
version = "0.1.30"
default-features = false
features = ["serde"]
optional = true
version = "~0.1.30"
[features]
all = ["json", "cbor", "toml-io", "yaml"]
cbor = ["io", "rustc-serialize", "serde_cbor"]
default = []
io = ["serde_codegen", "serde"]
json = ["io", "serde_json"]
toml-io = ["io", "toml/serde"]
yaml = ["io", "serde_yaml"]
[lib]
name = "tokei"
path = "src/lib/lib.rs"

View file

@ -6,8 +6,8 @@ use sort::Sort::*;
use stats::Stats;
/// Struct representing a single Language.
#[cfg_attr(feature = "io", derive(Deserialize, Serialize))]
#[derive(Clone, Debug, Default, Eq, Ord, PartialEq, PartialOrd)]
#[cfg_attr(feature = "io", derive(Clone, Debug, Deserialize, Default, Eq, Ord, PartialEq, PartialOrd, Serialize))]
#[cfg(feature = "io")]
pub struct Language {
/// Number of blank lines.
pub blanks: usize,
@ -16,23 +16,47 @@ pub struct Language {
/// Number of comments(both single, and multi-line)
pub comments: usize,
/// A collection of files to be analysed.
#[cfg_attr(feature = "io", serde(skip_deserializing, skip_serializing))]
#[serde(skip_deserializing, skip_serializing)]
pub files: Vec<PathBuf>,
/// A collection of statistics based on the files provide from `files`
pub stats: Vec<Stats>,
/// Number of total lines.
pub lines: usize,
/// A collection of single line comments in the language. ie. `//` in Rust.
#[cfg_attr(feature = "io", serde(skip_deserializing, skip_serializing))]
#[serde(skip_deserializing, skip_serializing)]
pub line_comment: Vec<&'static str>,
/// A collection of tuples representing the start and end of multi line comments. ie. `/* comment */` in Rust.
#[cfg_attr(feature = "io", serde(skip_deserializing, skip_serializing))]
#[serde(skip_deserializing, skip_serializing)]
pub multi_line: Vec<(&'static str, &'static str)>,
/// Whether the language supports nested multi line comments or not.
#[cfg_attr(feature = "io", serde(skip_deserializing, skip_serializing))]
#[serde(skip_deserializing, skip_serializing)]
pub nested: bool,
}
#[cfg(not(feature = "io"))]
#[derive(Clone, Debug, Default, Eq, Ord, PartialEq, PartialOrd)]
pub struct Language {
/// Number of blank lines.
pub blanks: usize,
/// Number of lines of code.
pub code: usize,
/// Number of comments(both single, and multi-line)
pub comments: usize,
/// A collection of files to be analysed.
pub files: Vec<PathBuf>,
/// A collection of statistics based on the files provide from `files`
pub stats: Vec<Stats>,
/// Number of total lines.
pub lines: usize,
/// A collection of single line comments in the language. ie. `//` in Rust.
pub line_comment: Vec<&'static str>,
/// A collection of tuples representing the start and end of multi line comments. ie. `/* comment */` in Rust.
pub multi_line: Vec<(&'static str, &'static str)>,
/// Whether the language supports nested multi line comments or not.
pub nested: bool,
}
impl Language {
/// Constructs a new empty Language with the comments provided.
///

View file

@ -163,98 +163,6 @@ pub enum LanguageType {
Zsh,
}
#[derive(Debug)]
pub enum Error {
Parse(String),
}
impl ::std::fmt::Display for Error {
fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
write!(f, "{:?}", self)
}
}
// #[cfg(feature = "io")]
// impl_as_ref_from_str! {
// LanguageType {
// ActionScript => "ActionScript",
// Assembly => "Assembly",
// Autoconf => "Autoconf",
// Bash => "BASH",
// Batch => "Batch",
// C => "C",
// CHeader => "C Header",
// Clojure => "Clojure",
// CoffeeScript => "CoffeeScript",
// ColdFusion => "ColdFusion",
// ColdFusionScript => "ColdFusion CFScript",
// Coq => "Coq",
// Cpp => "C++",
// CppHeader => "C++ Header",
// CSharp => "C#",
// CShell => "C Shell",
// Css => "CSS",
// D => "D",
// Dart => "Dart",
// DeviceTree => "Device Tree",
// Erlang => "Erlang",
// FortranLegacy => "FORTRAN Legacy",
// FortranModern => "FORTRAN Modern",
// Go => "Go",
// Haskell => "Haskell",
// Html => "HTML",
// Idris => "Idris",
// Isabelle => "Isabelle",
// Jai => "JAI",
// Java => "Java",
// JavaScript => "JavaScript",
// Json => "JSON",
// Jsx => "JSX",
// Julia => "Julia",
// Kotlin => "Kotlin",
// Less => "LESS",
// LinkerScript => "LD Script",
// Lisp => "LISP",
// Lua => "Lua",
// Makefile => "Makefile",
// Markdown => "Markdown",
// Mustache => "Mustache",
// Nim => "Nim",
// ObjectiveC => "Objective C",
// ObjectiveCpp => "Objective C++",
// OCaml => "OCaml",
// Oz => "Oz",
// Pascal => "Pascal",
// Perl => "Perl",
// Polly => "Polly",
// Php => "PHP",
// Protobuf => "Protocol Buffers",
// Prolog => "Prolog",
// Python => "Python",
// Qcl => "QCL",
// R => "R",
// Ruby => "Ruby",
// RubyHtml => "Ruby HTML",
// Rust => "Rust",
// Sass => "Sass",
// Scala => "Scala",
// Sml => "Standard ML",
// Sql => "SQL",
// Swift => "Swift",
// Tex => "TeX",
// Text => "Plain Text",
// Toml => "TOML",
// TypeScript => "TypeScript",
// UnrealScript => "Unreal Script",
// VimScript => "Vim Script",
// Wolfram => "Wolfram",
// Xml => "XML",
// Yaml => "YAML",
// Zsh => "Zsh",
// }
// Error::Parse
// }
impl LanguageType {
/// Returns the display name of a language.
///

View file

@ -48,9 +48,6 @@
#[macro_use]
extern crate maplit;
#[macro_use]
#[cfg(feature = "io")]
extern crate serializable_enum;
extern crate glob;
extern crate rayon;
#[cfg(feature = "io")]
@ -68,5 +65,5 @@ extern crate walkdir;
#[cfg(feature = "io")]
include!(concat!(env!("OUT_DIR"), "/lib.rs.in"));
#[not(cfg(feature = "io"))]
#[cfg(not(feature = "io"))]
include!("lib.rs.in");