diff options
| author | 2024-02-19 23:59:03 +0200 | |
|---|---|---|
| committer | 2024-02-20 00:13:09 +0200 | |
| commit | 99814350e51ad1c64040501cee5cf267e9e3ed79 (patch) | |
| tree | ea9f61eb18bc0e2c5011652d4cc6d528a955c296 /src/Syntax/zig.zig | |
| parent | Big update to modern zig (diff) | |
| download | es-99814350e51ad1c64040501cee5cf267e9e3ed79.tar.gz es-99814350e51ad1c64040501cee5cf267e9e3ed79.tar.xz es-99814350e51ad1c64040501cee5cf267e9e3ed79.zip | |
Update zig mode and theme
Diffstat (limited to 'src/Syntax/zig.zig')
| -rw-r--r-- | src/Syntax/zig.zig | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/src/Syntax/zig.zig b/src/Syntax/zig.zig index c8bc225..4e82496 100644 --- a/src/Syntax/zig.zig +++ b/src/Syntax/zig.zig | |||
| @@ -27,12 +27,12 @@ pub const syntax = Syntax{ | |||
| 27 | 27 | ||
| 28 | const keywords1 = [_][]const u8 { | 28 | const keywords1 = [_][]const u8 { |
| 29 | // keywords | 29 | // keywords |
| 30 | "align", "allowzero", "and", "anyframe", "anytype", "asm", "async", "await", "break", "callconv", | 30 | "addrspace", "align", "allowzero", "and", "anyframe", "anytype", "asm", "async", "await", |
| 31 | "catch", "comptime", "const", "continue", "defer", "else", "enum", "errdefer", "error", "export", | 31 | "break", "callconv", "catch", "comptime", "const", "continue", "defer", "else", "enum", |
| 32 | "extern", "fn", "for", "if", "inline", "noalias", "nosuspend", "noinline", "opaque", "or", | 32 | "errdefer", "error", "export", "extern", "fn", "for", "if", "inline", "linksection", "noalias", |
| 33 | "orelse", "packed", "pub", "resume", "return", "linksection", "struct", "suspend", "switch", | 33 | "noinline", "nosuspend", "opaque", "or", "orelse", "packed", "pub", "resume", "return", "struct", |
| 34 | "test", "threadlocal", "try", "union", "unreachable", "usingnamespace", "var", "volatile", | 34 | "suspend", "switch", "test", "threadlocal", "try", "union", "unreachable", "usingnamespace", |
| 35 | "while", | 35 | "var", "volatile", "while", |
| 36 | 36 | ||
| 37 | // primitive values | 37 | // primitive values |
| 38 | "false", "null", "true", "undefined", | 38 | "false", "null", "true", "undefined", |
| @@ -41,28 +41,35 @@ const keywords1 = [_][]const u8 { | |||
| 41 | const keywords2 = [_][]const u8 { | 41 | const keywords2 = [_][]const u8 { |
| 42 | // primitive types | 42 | // primitive types |
| 43 | // TODO: generate all the integer types | 43 | // TODO: generate all the integer types |
| 44 | "i8", "u8", "i16", "u16", "i32", "u32", "i64", "u64", "i128", "u128", "isize", "usize", | 44 | "i8", "u8", "i16", "u16", "i32", "u32", "i64", "u64", "i128", "u128", "isize", "usize", "c_char", |
| 45 | "c_short", "c_ushort", "c_int", "c_uint", "c_long", "c_ulong", "c_longlong", "c_ulonglong", | 45 | "c_short", "c_ushort", "c_int", "c_uint", "c_long", "c_ulong", "c_longlong", "c_ulonglong", |
| 46 | "c_longdouble", "f16", "f32", "f64", "f128", "bool", "anyopaque", "void", "noreturn", "type", | 46 | "c_longdouble", "f16", "f32", "f64", "f80", "f128", "bool", "anyopaque", "void", "noreturn", |
| 47 | "anyerror", "comptime_int", "comptime_float", | 47 | "type", "anyerror", "comptime_int", "comptime_float", |
| 48 | 48 | ||
| 49 | // former primitive types | 49 | // former primitive types |
| 50 | "c_void", | 50 | "c_void", |
| 51 | 51 | ||
| 52 | // builtin functions | 52 | // builtin functions |
| 53 | "@addWithOverflow", "@alignCast", "@alignOf", "@as", "@asyncCall", "@atomicLoad", "@atomicRmw", | 53 | "@addrSpaceCast", "@addWithOverflow", "@alignCast", "@alignOf", "@as", "@atomicLoad", |
| 54 | "@atomicStore", "@bitCast", "@bitOffsetOf", "@boolToInt", "@bitSizeOf", "@breakpoint", "@mulAdd", | 54 | "@atomicRmw", "@atomicStore", "@bitCast", "@bitOffsetOf", "@bitSizeOf", "@breakpoint", "@mulAdd", |
| 55 | "@byteSwap", "@bitReverse", "@offsetOf", "@call", "@cDefine", "@cImport", "@cInclude", "@clz", | 55 | "@byteSwap", "@bitReverse", "@offsetOf", "@call", "@cDefine", "@cImport", "@cInclude", "@clz", |
| 56 | "@cmpxchgStrong", "@cmpxchgWeak", "@compileError", "@compileLog", "@ctz", "@cUndef", "@divExact", | 56 | "@cmpxchgStrong", "@cmpxchgWeak", "@compileError", "@compileLog", "@constCast", "@ctz", |
| 57 | "@divFloor", "@divTrunc", "@embedFile", "@enumToInt", "@errorName", "@errorReturnTrace", | 57 | "@cUndef", "@cVaArg", "@cVaCopy", "@cVaEnd", "@cVaStart", "@divExact", "@divFloor", "@divTrunc", |
| 58 | "@errorToInt", "@errSetCast", "@export", "@extern", "@fence", "@field", "@fieldParentPtr", | 58 | "@embedFile", "@enumFromInt", "@errorFromInt", "@errorName", "@errorReturnTrace", "@errorCast", |
| 59 | "@floatCast", "@floatToInt", "@frame", "@Frame", "@frameAddress", "@frameSize", "@hasDecl", | 59 | "@export", "@extern", "@fence", "@field", "@fieldParentPtr", "@floatCast", "@floatFromInt", |
| 60 | "@hasField", "@import", "@intCast", "@intToEnum", "@intToError" , "@intToFloat", "@intToPtr", | 60 | "@frameAddress", "@hasDecl", "@hasField", "@import", "@inComptime", "@intCast", "@intFromBool", |
| 61 | "@maximum", "@memcpy", "@memset", "@minimum", "@wasmMemorySize", "@wasmMemoryGrow", "@mod", | 61 | "@intFromEnum", "@intFromError", "@intFromFloat", "@intFromPtr", "@max", "@memcpy", "@memset", |
| 62 | "@mulWithOverflow", "@panic", "@popCount", "@prefetch", "@ptrCast", "@ptrToInt", "@rem", | 62 | "@min", "@wasmMemorySize", "@wasmMemoryGrow", "@mod", "@mulWithOverflow", "@panic", "@popCount", |
| 63 | "@returnAddress", "@select", "@setAlignStack", "@setCold", "@setEvalBranchQuota", | 63 | "@prefetch", "@ptrCast", "@ptrFromInt", "@rem", "@returnAddress", "@select", "@setAlignStack", |
| 64 | "@setFloatMode", "@setRuntimeSafety", "@shlExact", "@shlWithOverflow", "@shrExact", "@shuffle", | 64 | "@setCold", "@setEvalBranchQuota", "@setFloatMode", "@setRuntimeSafety", "@shlExact", |
| 65 | "@sizeOf", "@splat", "@reduce", "@src", "@sqrt", "@sin", "@cos", "@exp", "@exp2", "@log", | 65 | "@shlWithOverflow", "@shrExact", "@shuffle", "@sizeOf", "@splat", "@reduce", "@src", "@sqrt", |
| 66 | "@log2", "@log10", "@fabs", "@floor", "@ceil", "@trunc", "@round", "@subWithOverflow", | 66 | "@sin", "@cos", "@tan", "@exp", "@exp2", "@log", "@log2", "@log10", "@abs", "@floor", "@ceil", |
| 67 | "@tagName", "@This", "@truncate", "@Type", "@typeInfo", "@typeName", "@TypeOf", "@unionInit", | 67 | "@trunc", "@round", "@subWithOverflow", "@tagName", "@This", "@trap", "@truncate", "@Type", |
| 68 | "@typeInfo", "@typeName", "@TypeOf", "@unionInit", "@Vector", "@volatileCast", "@workGroupId", | ||
| 69 | "@workGroupSize", "@workItemId", | ||
| 70 | |||
| 71 | // former builtin functions | ||
| 72 | "@asyncCall", "@boolToInt", "@enumToInt", "@errorToInt", "@errSetCast", "@floatToInt", "@frame", | ||
| 73 | "@Frame", "@frameSize", "@intToEnum", "@intToError" , "@intToFloat", "@intToPtr", "@maximum", | ||
| 74 | "@minimum", "@ptrToInt", "@fabs", | ||
| 68 | }; | 75 | }; |