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 {...@@ -385,7 +385,7 @@ pub fn main() -> %void {
385 <tr>385 <tr>
386 <td><code>noreturn</code></td>386 <td><code>noreturn</code></td>
387 <td>(none)</td>387 <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>
389 </tr>389 </tr>
390 <tr>390 <tr>
391 <td><code>type</code></td>391 <td><code>type</code></td>
...@@ -2622,7 +2622,6 @@ test "type of unreachable" {...@@ -2622,7 +2622,6 @@ test "type of unreachable" {
2622 <ul>2622 <ul>
2623 <li><code>break</code></li>2623 <li><code>break</code></li>
2624 <li><code>continue</code></li>2624 <li><code>continue</code></li>
2625 <li><code>goto</code></li>
2626 <li><code>return</code></li>2625 <li><code>return</code></li>
2627 <li><code>unreachable</code></li>2626 <li><code>unreachable</code></li>
2628 <li><code>while (true) {}</code></li>2627 <li><code>while (true) {}</code></li>
...@@ -3321,7 +3320,7 @@ test "foo" {...@@ -3321,7 +3320,7 @@ test "foo" {
3321 </p>3320 </p>
3322 <ul>3321 <ul>
3323 <li>All variables are <code>comptime</code> variables.</li>3322 <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>
3325 expressions are evaluated at compile-time, or emit a compile error if this is not possible.</li>3324 expressions are evaluated at compile-time, or emit a compile error if this is not possible.</li>
3326 <li>All function calls cause the compiler to interpret the function at compile-time, emitting a3325 <li>All function calls cause the compiler to interpret the function at compile-time, emitting a
3327 compile error if the function tries to do something that has global run-time side effects.</li>3326 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) {...@@ -5765,7 +5764,7 @@ hljs.registerLanguage("zig", function(t) {
5765 },5764 },
5766 a = t.IR + "\\s*\\(",5765 a = t.IR + "\\s*\\(",
5767 c = {5766 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",
5769 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",5768 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",
5770 literal: "true false null undefined"5769 literal: "true false null undefined"
5771 },5770 },
src/ast_render.cpp+1-1
...@@ -92,7 +92,7 @@ static const char *return_string(ReturnKind kind) {...@@ -92,7 +92,7 @@ static const char *return_string(ReturnKind kind) {
92static const char *defer_string(ReturnKind kind) {92static const char *defer_string(ReturnKind kind) {
93 switch (kind) {93 switch (kind) {
94 case ReturnKindUnconditional: return "defer";94 case ReturnKindUnconditional: return "defer";
95 case ReturnKindError: return "%defer";95 case ReturnKindError: return "errdefer";
96 }96 }
97 zig_unreachable();97 zig_unreachable();
98}98}