| ... | @@ -135,6 +135,12 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d | ... | @@ -135,6 +135,12 @@ fn do(alloc: std.mem.Allocator, writer: anytype, comptime value: astgen.Value, d |
| 135 | if (!opts.escaped) try writer.writeAll(s); | 135 | if (!opts.escaped) try writer.writeAll(s); |
| 136 | return; | 136 | return; |
| 137 | } | 137 | } |
| | 138 | if (TI == .Enum) { |
| | 139 | const s = @tagName(x); |
| | 140 | if (opts.escaped) try writeEscaped(s, writer); |
| | 141 | if (!opts.escaped) try writer.writeAll(s); |
| | 142 | return; |
| | 143 | } |
| 138 | @compileError(std.fmt.comptimePrint("pek: print {s}: unsupported type: {s}", .{ v, @typeName(TO) })); | 144 | @compileError(std.fmt.comptimePrint("pek: print {s}: unsupported type: {s}", .{ v, @typeName(TO) })); |
| 139 | }, | 145 | }, |
| 140 | .block => |v| { | 146 | .block => |v| { |
| ... | @@ -400,6 +406,8 @@ fn isCodepointAnEntity(cp: u21) ?htmlentities.Entity { | ... | @@ -400,6 +406,8 @@ fn isCodepointAnEntity(cp: u21) ?htmlentities.Entity { |
| 400 | ')', | 406 | ')', |
| 401 | '%', | 407 | '%', |
| 402 | '+', | 408 | '+', |
| | 409 | '/', |
| | 410 | '@', |
| 403 | => return null, | 411 | => return null, |
| 404 | else => {}, | 412 | else => {}, |
| 405 | } | 413 | } |