Add zig support
Some checks failed
timw4mail/php-kilo/pipeline/head There was a failure building this commit
Some checks failed
timw4mail/php-kilo/pipeline/head There was a failure building this commit
This commit is contained in:
parent
573f8c0cde
commit
8cb783ed2f
@ -166,6 +166,47 @@ class FileType {
|
||||
hasCommonOperators: false,
|
||||
syntaxFamily: SyntaxFamily::XML,
|
||||
),
|
||||
'.zig' => Syntax::new(
|
||||
'Zig',
|
||||
[
|
||||
'auto', 'break', 'case', 'const', 'continue', 'default', 'do', 'typedef', 'switch', 'return',
|
||||
'static', 'while', 'break', 'struct', 'extern', 'union', 'class', 'else', 'enum', 'for', 'case',
|
||||
'if', 'inline', 'register', 'restrict', 'return', 'sizeof', 'switch', 'typedef', 'union', 'volatile',
|
||||
'pub', 'fn', 'orelse', 'catch', 'and', 'or', 'comptime', 'test', 'var', 'opaque',
|
||||
'usingnamespace', 'errdefer', 'callconv', 'unreachable', 'defer', 'inline',
|
||||
'@addrSpaceCast', '@addWithOverflow', '@alignCast', '@alignOf', '@as', '@atomicLoad', '@atomicRmw',
|
||||
'@atomicStore', '@bitCast', '@bitOffsetOf', '@bitSizeOf', '@breakpoint', '@mulAdd', '@byteSwap',
|
||||
'@bitReverse', '@offsetOf', '@call', '@cDefine', '@cImport', '@cInclude', '@clz', '@cmpxchgStrong',
|
||||
'@cmpxchgWeak', '@compileError', '@compileLog', '@constCast', '@ctz', '@cUndef', '@cVaArg', '@cVaCopy',
|
||||
'@cVaEnd', '@cVaStart', '@divExact', '@divFloor', '@divTrunc', '@embedFile', '@enumFromInt', '@errorFromInt',
|
||||
'@errorName', '@errorReturnTrace', '@errorCast', '@export', '@extern', '@fence', '@field', '@fieldParentPtr',
|
||||
'@floatCast', '@floatFromInt', '@frameAddress', '@hasDecl', '@hasField', '@import', '@inComptime',
|
||||
'@intCast', '@intFromBool', '@intFromEnum', '@intFromError', '@intFromFloat', '@intFromPtr', '@max',
|
||||
'@memcpy', '@memset', '@min', "@wasmMemorySize", '@wasmMemoryGrow', '@mod', '@mulWithOverflow', '@panic',
|
||||
'@popCount', '@prefetch', '@ptrCast', '@ptrFromInt', '@rem', '@returnAddress', '@select', '@setAlignStack',
|
||||
'@setCold', '@setEvalBranchQuota', '@setFloatMode', '@setRuntimeSafety', '@shlExact', '@shlWithOverflow',
|
||||
'@shrExact', '@shuffle', '@sizeOf', '@splat', '@reduce', '@src', '@sqrt', '@sin', '@cos', '@tan', '@exp',
|
||||
'@exp2', '@log', '@log2', '@log10', '@abs', '@floor', '@ceil', '@trunc', '@round', '@subWithOverflow',
|
||||
'@tagName', '@This', '@trap', '@truncate', '@Type', '@typeInfo', '@typeName', '@TypeOf', '@unionint',
|
||||
'@Vector', '@volatileCast', '@workGroupId', '@workGroupSize', '@workItemId',
|
||||
],
|
||||
[
|
||||
'i8', 'u8', 'i16', 'u16', 'i32', 'u32', 'i64', 'u64', 'i128', 'u128', 'isize', 'usize',
|
||||
'c_char', 'c_short', 'c_ushort', 'c_int', 'c_uint', 'c_long', 'c_ulong', 'c_longlong',
|
||||
'c_ulonglong', 'c_longdouble',
|
||||
'f16', 'f32', 'f64', 'f80', 'f128', 'bool', 'anyopaque', 'void', 'noreturn', 'type',
|
||||
'anyerror', 'comptime_init', 'comptime_float',
|
||||
],
|
||||
[
|
||||
'<=>', '<<=', '>>=', '...',
|
||||
'++', '--', '==', '!=', '>=', '<=', '&&', '||', '<<', '>>',
|
||||
'+=', '-=', '*=', '/=', '%=', '&=', '|=', '^=', '->', '::',
|
||||
'+%', '+%=', '+|', '+|=', '-%', '-%=', '*%', '*%=', '*|', '*|=',
|
||||
'.?', '++', '**', '.*',
|
||||
],
|
||||
mcs: '',
|
||||
mce: '',
|
||||
),
|
||||
default => Syntax::default(),
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user