enumstd.Build.Module.CSourceLanguage[src]

Fields

c
cpp
objective_c
objective_cpp
assembly

Standard assembly

assembly_with_preprocessor

Assembly with the C preprocessor

Functions

FunctioninternalIdentifier[src]

pub fn internalIdentifier(self: CSourceLanguage) []const u8

Parameters

Source Code

Source code
pub fn internalIdentifier(self: CSourceLanguage) []const u8 {
    return switch (self) {
        .c => "c",
        .cpp => "c++",
        .objective_c => "objective-c",
        .objective_cpp => "objective-c++",
        .assembly => "assembler",
        .assembly_with_preprocessor => "assembler-with-cpp",
    };
}

Source Code

Source code
pub const CSourceLanguage = enum {
    c,
    cpp,

    objective_c,
    objective_cpp,

    /// Standard assembly
    assembly,
    /// Assembly with the C preprocessor
    assembly_with_preprocessor,

    pub fn internalIdentifier(self: CSourceLanguage) []const u8 {
        return switch (self) {
            .c => "c",
            .cpp => "c++",
            .objective_c => "objective-c",
            .objective_cpp => "objective-c++",
            .assembly => "assembler",
            .assembly_with_preprocessor => "assembler-with-cpp",
        };
    }
}