From 5ec48c0824289bf17d36302b50a520b537e4794e Mon Sep 17 00:00:00 2001 From: Sven-Hendrik Haase Date: Tue, 25 Oct 2016 04:04:20 +0200 Subject: [PATCH] Add GLSL --- README.md | 1 + src/lib.rs | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b67f6fb..5ccd9ef 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ Erlang Forth FortranLegacy FortranModern +GLSL Go Handlebars Haskell diff --git a/src/lib.rs b/src/lib.rs index 19b0e2f..cf34d6b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -87,6 +87,7 @@ pub enum Lang { Forth, FortranLegacy, FortranModern, + Glsl, Go, Handlebars, Haskell, @@ -181,6 +182,7 @@ impl Lang { Forth => "Forth", FortranLegacy => "FORTRAN Legacy", FortranModern => "FORTRAN Modern", + Glsl => "GLSL", Go => "Go", Handlebars => "Handlebars", Haskell => "Haskell", @@ -289,6 +291,7 @@ pub fn lang_from_ext(filepath: &str) -> Lang { "dts" | "dtsi" => DeviceTree, "el" | "lisp" | "lsp" => Lisp, "erl" | "hrl" => Erlang, + "vert" | "tesc" | "tese" | "geom" | "frag" | "comp" => Glsl, "go" => Go, "h" | "hh" | "hpp" | "hxx" => CCppHeader, "hbs" | "handlebars" => Handlebars, @@ -444,7 +447,7 @@ pub fn counter_config_for_lang<'a>(lang: &Lang) -> LineConfig<'a> { // TODO(cgag): not 100% sure that yacc belongs here. C | CCppHeader | Rust | Yacc | ActionScript | ColdFusionScript | Css | Cpp | CSharp | - Dart | DeviceTree | Go | Jai | Java | JavaScript | Jsx | Kotlin | Less | LinkerScript | + Dart | DeviceTree | Glsl | Go | Jai | Java | JavaScript | Jsx | Kotlin | Less | LinkerScript | ObjectiveC | ObjectiveCpp | Qcl | Sass | Scala | Swift | TypeScript | UnrealScript | Unrecognized => c_style, };