Added GLSL support (#72)

This commit is contained in:
Sven-Hendrik Haase 2016-10-15 17:47:59 +02:00 committed by Aaron Power
parent 9faa8d4210
commit d98133347e
4 changed files with 8 additions and 0 deletions

View File

@ -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 File

@ -189,6 +189,7 @@ Erlang
Forth
FORTRAN Legacy
FORTRAN Modern
GLSL
Go
Handlebars
Haskell

View File

@ -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,

View File

@ -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![("\"", "\""), ("'", "'")]),