| ... | @@ -79,6 +79,11 @@ fn renderMember(ais: *Ais, tree: ast.Tree, decl: ast.Node.Index, space: Space) E | ... | @@ -79,6 +79,11 @@ fn renderMember(ais: *Ais, tree: ast.Tree, decl: ast.Node.Index, space: Space) E |
| 79 | } | 79 | } |
| 80 | } | 80 | } |
| 81 | while (i < fn_token) : (i += 1) { | 81 | while (i < fn_token) : (i += 1) { |
| | 82 | if (token_tags[i] == .keyword_inline) { |
| | 83 | // TODO remove this special case when 0.9.0 is released. |
| | 84 | // See the commit that introduced this comment for more details. |
| | 85 | continue; |
| | 86 | } |
| 82 | try renderToken(ais, tree, i, .space); | 87 | try renderToken(ais, tree, i, .space); |
| 83 | } | 88 | } |
| 84 | assert(datas[decl].rhs != 0); | 89 | assert(datas[decl].rhs != 0); |
| ... | @@ -1260,6 +1265,9 @@ fn renderFnProto(ais: *Ais, tree: ast.Tree, fn_proto: ast.full.FnProto, space: S | ... | @@ -1260,6 +1265,9 @@ fn renderFnProto(ais: *Ais, tree: ast.Tree, fn_proto: ast.full.FnProto, space: S |
| 1260 | const token_tags = tree.tokens.items(.tag); | 1265 | const token_tags = tree.tokens.items(.tag); |
| 1261 | const token_starts = tree.tokens.items(.start); | 1266 | const token_starts = tree.tokens.items(.start); |
| 1262 | | 1267 | |
| | 1268 | const is_inline = fn_proto.ast.fn_token > 0 and |
| | 1269 | token_tags[fn_proto.ast.fn_token - 1] == .keyword_inline; |
| | 1270 | |
| 1263 | const after_fn_token = fn_proto.ast.fn_token + 1; | 1271 | const after_fn_token = fn_proto.ast.fn_token + 1; |
| 1264 | const lparen = if (token_tags[after_fn_token] == .identifier) blk: { | 1272 | const lparen = if (token_tags[after_fn_token] == .identifier) blk: { |
| 1265 | try renderToken(ais, tree, fn_proto.ast.fn_token, .space); // fn | 1273 | try renderToken(ais, tree, fn_proto.ast.fn_token, .space); // fn |
| ... | @@ -1435,6 +1443,8 @@ fn renderFnProto(ais: *Ais, tree: ast.Tree, fn_proto: ast.full.FnProto, space: S | ... | @@ -1435,6 +1443,8 @@ fn renderFnProto(ais: *Ais, tree: ast.Tree, fn_proto: ast.full.FnProto, space: S |
| 1435 | try renderToken(ais, tree, callconv_lparen, .none); // ( | 1443 | try renderToken(ais, tree, callconv_lparen, .none); // ( |
| 1436 | try renderExpression(ais, tree, fn_proto.ast.callconv_expr, .none); | 1444 | try renderExpression(ais, tree, fn_proto.ast.callconv_expr, .none); |
| 1437 | try renderToken(ais, tree, callconv_rparen, .space); // ) | 1445 | try renderToken(ais, tree, callconv_rparen, .space); // ) |
| | 1446 | } else if (is_inline) { |
| | 1447 | try ais.writer().writeAll("callconv(.Inline) "); |
| 1438 | } | 1448 | } |
| 1439 | | 1449 | |
| 1440 | if (token_tags[maybe_bang] == .bang) { | 1450 | if (token_tags[maybe_bang] == .bang) { |