From daf74a1faf6336588128123c8e6e9f69f617690d Mon Sep 17 00:00:00 2001 From: Scribe of the Ziggurat <72305366+zigster64@users.noreply.github.com> Date: Thu, 1 Dec 2022 04:40:21 +1000 Subject: [PATCH] Add code_zig for Zig programming language, for great justice (#3782) zigster * Add code_zig for Zig programming language, for great justice * fix dupes --- frontend/static/languages/_groups.json | 3 +- frontend/static/languages/_list.json | 1 + frontend/static/languages/code_zig.json | 154 ++++++++++++++++++++++++ 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 frontend/static/languages/code_zig.json diff --git a/frontend/static/languages/_groups.json b/frontend/static/languages/_groups.json index 3d11b644f..bef3968e1 100644 --- a/frontend/static/languages/_groups.json +++ b/frontend/static/languages/_groups.json @@ -430,7 +430,8 @@ "code_visual_basic", "code_arduino", "code_systemverilog", - "code_elixir" + "code_elixir", + "code_zig" ] }, { diff --git a/frontend/static/languages/_list.json b/frontend/static/languages/_list.json index 5a192837b..35991b2f8 100644 --- a/frontend/static/languages/_list.json +++ b/frontend/static/languages/_list.json @@ -254,4 +254,5 @@ ,"code_arduino" ,"code_systemverilog" ,"code_elixir" + ,"code_zig" ] diff --git a/frontend/static/languages/code_zig.json b/frontend/static/languages/code_zig.json new file mode 100644 index 000000000..815bb1118 --- /dev/null +++ b/frontend/static/languages/code_zig.json @@ -0,0 +1,154 @@ +{ + "name": "code_zig", + "leftToRight": true, + "noLazyMode": true, + "ligatures": false, + "words": [ + "std.debug.print" + ,"std.mem.Allocator" + ,"allocator" + ,"switch" + ,"=>" + ,"==" + ,"+=" + ,"break" + ,"else" + ,"orelse" + ,"enum" + ,"select" + ,"defer" + ,"struct" + ,"u8" + ,"?u8" + ,"u16" + ,"usize" + ,"?usize" + ,"float" + ,"i32" + ,"+%" + ,"[]const" + ,"?[]const" + ,"*const" + ,"const*" + ,"[]u8" + ,"?[]u8" + ,"bool" + ,"import" + ,"if" + ,"for" + ,"while" + ,"return" + ,"var" + ,"@as" + ,"@bitCast" + ,"@enumToInt" + ,"@field" + ,"@Type" + ,"@TypeOf" + ,"@intCast" + ,"i+=1" + ,"pub" + ,"fn()" + ,"void" + ,"comptime" + ,"main()" + ,".{}" + ,"undefined" + ,"array.len" + ,"try" + ,"expect" + ,"true" + ,"false" + ,"catch" + ,"error" + ,"unreachable" + ,"async" + ,"await" + ,"suspend" + ,"resume" + ,"frame" + ,"nosuspend" + ,"@Frame" + ,"@frame" + ,"value" + ,"noreturn" + ,"blk:" + ,"enum(u8)" + ,"union" + ,":blk" + ,"any" + ,"anyopaque" + ,".name" + ,"std.heap.page_allocator" + ,"allocator.alloc" + ,"allocator.free" + ,".init" + ,".deinit" + ,"arena.allocator" + ,".create" + ,".destroy" + ,"gpa.allocator" + ,"gpa.deinit" + ,"std.mem.eql" + ,"std.ArrayList" + ,"std.testing" + ,"list.append" + ,"std.fs.cwd" + ,"buffer" + ,"stat.size" + ,"iter" + ,".iterate" + ,"dir.createFile" + ,".reader()" + ,".writer()" + ,"std.io.getStdOut()" + ,"stdin.reader()" + ,"std.io.Writer" + ,"std.fmt" + ,"std.json" + ,"TokenStream" + ,"FixedBufferAllocator" + ,"std.json.stringify" + ,"std.json.parse" + ,"DefaultPrng" + ,"random" + ,"rand.int" + ,"std.time.sleep" + ,"AutoHashMap" + ,"StringHashMap" + ,"HashMap" + ,"sort" + ,"openDir" + ,"self" + ,"Self" + ,"@This()" + ,"iter.next()" + ,"bufPrint" + ,"{s}" + ,"{d}" + ,"{}" + ,"{?}" + ,"{any}" + ,"{d:.2}" + ,"init-exe" + ,"build" + ,"-target" + ,"aarch64" + ,"ReleaseSmall" + ,"addExecutable" + ,"std.build.Step" + ,"addStaticLibrary" + ,"setBuildMode" + ,"dependOn" + ,"callconv" + ,"extern" + ,"@ptrCast" + ,"align" + ,"packed" + ,"@sizeOf" + ,"state" + ,"value.*" + ,"timer.?.read" + ,"|delay|" + ] +}