Permalink
Browse files

Added GLSL support (#72)

  • Loading branch information...
svenstaro authored and Aaronepower committed Oct 15, 2016
1 parent 9faa8d4 commit d98133347eb7fbb4d60f11fb9bd40ac8b31c421d
Showing with 8 additions and 0 deletions.
  1. +1 −0 CONTRIBUTORS.md
  2. +1 −0 README.md
  3. +5 −0 src/lib/language/language_type.rs
  4. +1 −0 src/lib/language/languages.rs
View
@@ -5,6 +5,7 @@ The list of contributors is sorted alphabetical based on the last names.
The list of languages is sorted alphabetical.
## Code
* Sven-Hendrik Haase (https://github.com/svenstaro)
* Chris Palmer (https://github.com/PhnxRbrn)
* Aaron Power (https://github.com/Aaronepower)
* Luthaf (https://github.com/Luthaf)
View
@@ -189,6 +189,7 @@ Erlang
Forth
FORTRAN Legacy
FORTRAN Modern
GLSL
Go
Handlebars
Haskell
@@ -67,6 +67,8 @@ pub enum LanguageType {
FortranLegacy,
/// FortranModern
FortranModern,
/// GLSL
Glsl,
/// Go
Go,
/// Handlebars
@@ -223,6 +225,7 @@ impl LanguageType {
Forth => "Forth",
FortranLegacy => "FORTRAN Legacy",
FortranModern => "FORTRAN Modern",
Glsl => "GLSL",
Go => "Go",
Handlebars => "Handlebars",
Haskell => "Haskell",
@@ -320,6 +323,7 @@ impl LanguageType {
"ft" => Some(Forth),
"f" | "for" | "ftn" | "f77" | "pfo" => Some(FortranLegacy),
"f03" | "f08" | "f90" | "f95" => Some(FortranModern),
"vert" | "tesc" | "tese" | "geom" | "frag" | "comp" => Some(Glsl),
"go" => Some(Go),
"h" => Some(CHeader),
"hbs" | "handlebars" => Some(Handlebars),
@@ -429,6 +433,7 @@ impl<'a> From<&'a str> for LanguageType {
"Forth" => Forth,
"FortranLegacy" => FortranLegacy,
"FortranModern" => FortranModern,
"GLSL" => Glsl,
"Go" => Go,
"Handlebars" => Handlebars,
"Haskell" => Haskell,
@@ -292,6 +292,7 @@ impl Languages {
.set_quotes(vec![("\"", "\""), ("'", "'")]),
FortranModern => Language::new_single(vec!["!"])
.set_quotes(vec![("\"", "\""), ("'", "'")]),
Glsl => Language::new_c(),
Go => Language::new_c(),
Handlebars => Language::new_multi(vec![("<!--", "-->"), ("{{!", "}}")])
.set_quotes(vec![("\"", "\""), ("'", "'")]),

0 comments on commit d981333

Please sign in to comment.