// zig fmt: off const es = @import("root"); const std = @import("std"); const Syntax = es.Syntax; // TODO: Add support for the multiline string \\ pub const syntax = Syntax{ .name = "Zig", .filematch = &[_][]const u8{ ".zig" }, .keywords1 = &[_][]const u8{ // keywords "align", "allowzero", "and", "anyframe", "anytype", "asm", "async", "await", "break", "callconv", "catch", "comptime", "const", "continue", "defer", "else", "enum", "errdefer", "error", "export", "extern", "fn", "for", "if", "inline", "noalias", "nosuspend", "noinline", "opaque", "or", "orelse", "packed", "pub", "resume", "return", "linksection", "struct", "suspend", "switch", "test", "threadlocal", "try", "union", "unreachable", "usingnamespace", "var", "volatile", "while", // primitive values "false", "null", "true", "undefined", }, .keywords2 = &[_][]const u8{ // primitive types "i8", "u8", "i16", "u16", "i32", "u32", "i64", "u64", "i128", "u128", "isize", "usize", "c_short", "c_ushort", "c_int", "c_uint", "c_long", "c_ulong", "c_longlong", "c_ulonglong", "c_longdouble", "f16", "f32", "f64", "f128", "bool", "anyopaque", "void", "noreturn", "type", "anyerror", "comptime_int", "comptime_float", // removed types "c_void", // TODO: Generate all integer types // builtin functions "@addWithOverflow", "@alignCast", "@alignOf", "@as", "@asyncCall", "@atomicLoad", "@atomicRmw", "@atomicStore", "@bitCast", "@bitOffsetOf", "@boolToInt", "@bitSizeOf", "@breakpoint", "@mulAdd", "@byteSwap", "@bitReverse", "@offsetOf", "@call", "@cDefine", "@cImport", "@cInclude", "@clz", "@cmpxchgStrong", "@cmpxchgWeak", "@compileError", "@compileLog", "@ctz", "@cUndef", "@divExact", "@divFloor", "@divTrunc", "@embedFile", "@enumToInt", "@errorName", "@errorReturnTrace", "@errorToInt", "@errSetCast", "@export", "@extern", "@fence", "@field", "@fieldParentPtr", "@floatCast", "@floatToInt", "@frame", "@Frame", "@frameAddress", "@frameSize", "@hasDecl", "@hasField", "@import", "@intCast", "@intToEnum", "@intToError" , "@intToFloat", "@intToPtr", "@maximum", "@memcpy", "@memset", "@minimum", "@wasmMemorySize", "@wasmMemoryGrow", "@mod", "@mulWithOverflow", "@panic", "@popCount", "@prefetch", "@ptrCast", "@ptrToInt", "@rem", "@returnAddress", "@select", "@setAlignStack", "@setCold", "@setEvalBranchQuota", "@setFloatMode", "@setRuntimeSafety", "@shlExact", "@shlWithOverflow", "@shrExact", "@shuffle", "@sizeOf", "@splat", "@reduce", "@src", "@sqrt", "@sin", "@cos", "@exp", "@exp2", "@log", "@log2", "@log10", "@fabs", "@floor", "@ceil", "@trunc", "@round", "@subWithOverflow", "@tagName", "@This", "@truncate", "@Type", "@typeInfo", "@typeName", "@TypeOf", "@unionInit", }, .singleline_comment_start = "//", .multiline_comment_start = null, .multiline_comment_end = null, .separators = "&*^:,.=!<{[(-%|+?>}]);/~", .flags = .{ .hl_numbers = true, .hl_strings = true }, };