tiny.syn.name
Defined in language.
A caller that shows or stores a language uses this short name, and fromName reads it back.
Source
Source: lib/syn/src/language.zig:68
zig
/// A caller that shows or stores a language uses this short name, and `fromName` reads it back. The/// call returns a short lowercase name for the tag. The name equals the tag's own name, except that/// `shell` gives `sh`. `fromName` maps every returned name back to the same tag. The returned text/// is static and needs no freeing.pub fn name(language: Language) []const u8 { return switch (language) { .zig => "zig", .chiclet => "chiclet", .lisp => "lisp", .json => "json", .shell => "sh", .diff => "diff", .markdown => "markdown", .python => "python", .yaml => "yaml", .toml => "toml", .c => "c", .cpp => "cpp", .csharp => "csharp", .java => "java", .javascript => "javascript", .typescript => "typescript", .go => "go", .rust => "rust", .ruby => "ruby", .php => "php", .swift => "swift", .kotlin => "kotlin", .scala => "scala", .sql => "sql", .html => "html", .css => "css", .xml => "xml", .nix => "nix", .lua => "lua", .haskell => "haskell", .elixir => "elixir", .erlang => "erlang", .clojure => "clojure", .ocaml => "ocaml", .r => "r", .make => "make", .perl => "perl", .dart => "dart", .vue => "vue", .svelte => "svelte", };}Source: lib/syn/src/root.zig:55
zig
pub const name = language.name;Audit
| Definitions | 1 |
|---|---|
| Public names | 2 |
| Members | 0 |
| Version | 26.7.0 |
| Revision | daab053ee433 |