diff --git a/languages.yml b/languages.yml index ce85297..afa4758 100644 --- a/languages.yml +++ b/languages.yml @@ -1949,6 +1949,18 @@ GN: codemirror_mode: python codemirror_mime_type: text/x-python language_id: 302957008 +GSC: + type: programming + color: "#FF6800" + extensions: + - ".gsc" + - ".csc" + - ".gsh" + tm_scope: source.gsc + ace_mode: c_cpp + codemirror_mode: clike + codemirror_mime_type: text/x-csrc + language_id: 257856279 Game Maker Language: type: programming color: "#71b417" diff --git a/linguist b/linguist index ba3451b..7469c79 160000 --- a/linguist +++ b/linguist @@ -1 +1 @@ -Subproject commit ba3451b81ea2af08d7212a483fc2023e1f33e4a6 +Subproject commit 7469c7982d93f2ad922230d712f586a353dc1a42 diff --git a/src/linguist_aliases.rs b/src/linguist_aliases.rs index a2943ab..8f6a298 100644 --- a/src/linguist_aliases.rs +++ b/src/linguist_aliases.rs @@ -317,6 +317,7 @@ lazy_static! { ("gedcom".to_string(), "GEDCOM".to_string()), ("glsl".to_string(), "GLSL".to_string()), ("gn".to_string(), "GN".to_string()), + ("gsc".to_string(), "GSC".to_string()), ( "game maker language".to_string(), "Game Maker Language".to_string() diff --git a/src/linguist_extensions.rs b/src/linguist_extensions.rs index add9941..8150306 100644 --- a/src/linguist_extensions.rs +++ b/src/linguist_extensions.rs @@ -289,6 +289,9 @@ lazy_static! { (".vshader".to_string(), "GLSL".to_string()), (".gn".to_string(), "GN".to_string()), (".gni".to_string(), "GN".to_string()), + (".gsc".to_string(), "GSC".to_string()), + (".csc".to_string(), "GSC".to_string()), + (".gsh".to_string(), "GSC".to_string()), (".kid".to_string(), "Genshi".to_string()), (".ebuild".to_string(), "Gentoo Ebuild".to_string()), (".eclass".to_string(), "Gentoo Eclass".to_string()), diff --git a/tests/linguist.rs b/tests/linguist.rs index 1af0304..7adbfda 100644 --- a/tests/linguist.rs +++ b/tests/linguist.rs @@ -5899,6 +5899,60 @@ mod gn { } } +mod gsc { + use file_expert::guess; + use file_expert::Guess; + use std::path::Path; + + #[test] + fn test_0() { + let path = Path::new(&"./samples/GSC/array_override_common.gsc"); + let actual = guess(&path).unwrap(); + let expected = Guess::Kind("GSC".to_string()); + assert_eq!(actual, expected); + } + + #[test] + fn test_1() { + let path = Path::new(&"./samples/GSC/zm_init.gsc"); + let actual = guess(&path).unwrap(); + let expected = Guess::Kind("GSC".to_string()); + assert_eq!(actual, expected); + } + + #[test] + fn test_2() { + let path = Path::new(&"./samples/GSC/_spiderbot_ride.csc"); + let actual = guess(&path).unwrap(); + let expected = Guess::Kind("GSC".to_string()); + assert_eq!(actual, expected); + } + + #[test] + fn test_3() { + let path = Path::new(&"./samples/GSC/struct.gsc"); + let actual = guess(&path).unwrap(); + let expected = Guess::Kind("GSC".to_string()); + assert_eq!(actual, expected); + } + + #[test] + fn test_4() { + let path = Path::new(&"./samples/GSC/array_override_common.gsh"); + let actual = guess(&path).unwrap(); + let expected = Guess::Kind("GSC".to_string()); + assert_eq!(actual, expected); + } + + #[test] + fn test_5() { + let path = Path::new(&"./samples/GSC/math_shared.gsc"); + let actual = guess(&path).unwrap(); + let expected = Guess::Kind("GSC".to_string()); + assert_eq!(actual, expected); + } +} + mod game_maker_language { use file_expert::guess; use file_expert::Guess;