| ... | ... | @@ -42,7 +42,8 @@ pub const URL = struct { |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | 44 | /// https://url.spec.whatwg.org/#concept-basic-url-parser |
| 45 | | fn parseBasic(alloc: std.mem.Allocator, input: []const u8, base: ?*const URL, state_override: ?BasicParserState) error{ InvalidURL, OutOfMemory }!URL { |
| 45 | pub fn parseBasic(alloc: std.mem.Allocator, input: []const u8, base: ?*const URL, state_override: ?BasicParserState) error{ InvalidURL, OutOfMemory }!URL { |
| 46 | std.debug.assert(state_override == null); // TODO: |
| 46 | 47 | // input is a scalar value string |
| 47 | 48 | if (!std.unicode.utf8ValidateSlice(input)) return error.InvalidURL; |
| 48 | 49 | |