Returns the human-readable language name.
(&self)
| 117 | |
| 118 | /// Returns the human-readable language name. |
| 119 | pub fn name(&self) -> &'static str { |
| 120 | match self { |
| 121 | Language::TypeScript => "TypeScript", |
| 122 | Language::Tsx => "TSX", |
| 123 | Language::Python => "Python", |
| 124 | Language::Rust => "Rust", |
| 125 | Language::Go => "Go", |
| 126 | Language::Java => "Java", |
| 127 | Language::Cpp => "C++", |
| 128 | Language::C => "C", |
| 129 | Language::Swift => "Swift", |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | /// Returns the file extensions associated with this language. |
| 134 | pub fn extensions(&self) -> &'static [&'static str] { |