authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-01-23 23:12:38-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-01-23 23:12:38-05:00
logb71a56c9df5e3b20d06cac24062456821b69dbba
tree385fc9ef2e03890023d687f27159455eb0bc9a08
parentb3a6faf13ebccb82bb5fa82012bb62699a8ff6fb

cleanups that I meant to put in the previous commit


2 files changed, 4 insertions(+), 5 deletions(-)

doc/langref.html.in+3-4
......@@ -385,7 +385,7 @@ pub fn main() -> %void {
385385 <tr>
386386 <td><code>noreturn</code></td>
387387 <td>(none)</td>
388 <td>the type of <code>break</code>, <code>continue</code>, <code>goto</code>, <code>return</code>, <code>unreachable</code>, and <code>while (true) {}</code></td>
388 <td>the type of <code>break</code>, <code>continue</code>, <code>return</code>, <code>unreachable</code>, and <code>while (true) {}</code></td>
389389 </tr>
390390 <tr>
391391 <td><code>type</code></td>
......@@ -2622,7 +2622,6 @@ test "type of unreachable" {
26222622 <ul>
26232623 <li><code>break</code></li>
26242624 <li><code>continue</code></li>
2625 <li><code>goto</code></li>
26262625 <li><code>return</code></li>
26272626 <li><code>unreachable</code></li>
26282627 <li><code>while (true) {}</code></li>
......@@ -3321,7 +3320,7 @@ test "foo" {
33213320 </p>
33223321 <ul>
33233322 <li>All variables are <code>comptime</code> variables.</li>
3324 <li>All <code>if</code>, <code>while</code>, <code>for</code>, <code>switch</code>, and <code>goto</code>
3323 <li>All <code>if</code>, <code>while</code>, <code>for</code>, and <code>switch</code>
33253324 expressions are evaluated at compile-time, or emit a compile error if this is not possible.</li>
33263325 <li>All function calls cause the compiler to interpret the function at compile-time, emitting a
33273326 compile error if the function tries to do something that has global run-time side effects.</li>
......@@ -5765,7 +5764,7 @@ hljs.registerLanguage("zig", function(t) {
57655764 },
57665765 a = t.IR + "\\s*\\(",
57675766 c = {
5768 keyword: "const align var extern stdcallcc nakedcc volatile export pub noalias inline struct packed enum union goto break return try catch test continue unreachable comptime and or asm defer if else switch while for fn use bool f32 f64 void type noreturn error i8 u8 i16 u16 i32 u32 i64 u64 isize usize i8w u8w i16w i32w u32w i64w u64w isizew usizew c_short c_ushort c_int c_uint c_long c_ulong c_longlong c_ulonglong",
5767 keyword: "const align var extern stdcallcc nakedcc volatile export pub noalias inline struct packed enum union break return try catch test continue unreachable comptime and or asm defer errdefer if else switch while for fn use bool f32 f64 void type noreturn error i8 u8 i16 u16 i32 u32 i64 u64 isize usize i8w u8w i16w i32w u32w i64w u64w isizew usizew c_short c_ushort c_int c_uint c_long c_ulong c_longlong c_ulonglong",
57695768 built_in: "breakpoint returnAddress frameAddress fieldParentPtr setFloatMode IntType OpaqueType compileError compileLog setCold setDebugSafety setEvalBranchQuota offsetOf memcpy inlineCall setGlobalLinkage setGlobalSection divTrunc divFloor enumTagName intToPtr ptrToInt panic canImplicitCast ptrCast bitCast rem mod memset sizeOf alignOf alignCast maxValue minValue memberCount typeOf addWithOverflow subWithOverflow mulWithOverflow shlWithOverflow shlExact shrExact cInclude cDefine cUndef ctz clz import cImport errorName embedFile cmpxchg fence divExact truncate",
57705769 literal: "true false null undefined"
57715770 },
src/ast_render.cpp+1-1
......@@ -92,7 +92,7 @@ static const char *return_string(ReturnKind kind) {
9292static const char *defer_string(ReturnKind kind) {
9393 switch (kind) {
9494 case ReturnKindUnconditional: return "defer";
95 case ReturnKindError: return "%defer";
95 case ReturnKindError: return "errdefer";
9696 }
9797 zig_unreachable();
9898}