Skip to content

Commit

Permalink
cleanups that I meant to put in the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrk committed Jan 24, 2018
1 parent b3a6faf commit b71a56c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions doc/langref.html.in
Expand Up @@ -385,7 +385,7 @@ pub fn main() -> %void {
<tr>
<td><code>noreturn</code></td>
<td>(none)</td>
<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>
<td>the type of <code>break</code>, <code>continue</code>, <code>return</code>, <code>unreachable</code>, and <code>while (true) {}</code></td>
</tr>
<tr>
<td><code>type</code></td>
Expand Down Expand Up @@ -2622,7 +2622,6 @@ test "type of unreachable" {
<ul>
<li><code>break</code></li>
<li><code>continue</code></li>
<li><code>goto</code></li>
<li><code>return</code></li>
<li><code>unreachable</code></li>
<li><code>while (true) {}</code></li>
Expand Down Expand Up @@ -3321,7 +3320,7 @@ test "foo" {
</p>
<ul>
<li>All variables are <code>comptime</code> variables.</li>
<li>All <code>if</code>, <code>while</code>, <code>for</code>, <code>switch</code>, and <code>goto</code>
<li>All <code>if</code>, <code>while</code>, <code>for</code>, and <code>switch</code>
expressions are evaluated at compile-time, or emit a compile error if this is not possible.</li>
<li>All function calls cause the compiler to interpret the function at compile-time, emitting a
compile error if the function tries to do something that has global run-time side effects.</li>
Expand Down Expand Up @@ -5765,7 +5764,7 @@ hljs.registerLanguage("zig", function(t) {
},
a = t.IR + "\\s*\\(",
c = {
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",
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",
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",
literal: "true false null undefined"
},
Expand Down
2 changes: 1 addition & 1 deletion src/ast_render.cpp
Expand Up @@ -92,7 +92,7 @@ static const char *return_string(ReturnKind kind) {
static const char *defer_string(ReturnKind kind) {
switch (kind) {
case ReturnKindUnconditional: return "defer";
case ReturnKindError: return "%defer";
case ReturnKindError: return "errdefer";
}
zig_unreachable();
}
Expand Down

0 comments on commit b71a56c

Please sign in to comment.