| ... | @@ -222,55 +222,3 @@ pub const Parser = struct { | ... | @@ -222,55 +222,3 @@ pub const Parser = struct { |
| 222 | }; | 222 | }; |
| 223 | } | 223 | } |
| 224 | }; | 224 | }; |
| 225 | | | |
| 226 | pub fn Mixin(comptime T: type) type { | | |
| 227 | return struct { | | |
| 228 | pub fn avail(pp: *T) usize { | | |
| 229 | return pp.parser.avail(); | | |
| 230 | } | | |
| 231 | | | |
| 232 | pub fn slice(pp: *T) []const u8 { | | |
| 233 | return pp.parser.slice(); | | |
| 234 | } | | |
| 235 | | | |
| 236 | pub fn eat(pp: *T, comptime test_s: string) !?void { | | |
| 237 | return pp.parser.eat(test_s); | | |
| 238 | } | | |
| 239 | | | |
| 240 | pub fn peekAmt(pp: *T, amt: usize) !?void { | | |
| 241 | return pp.parser.peekAmt(amt); | | |
| 242 | } | | |
| 243 | | | |
| 244 | pub fn eatByte(pp: *T, test_c: u8) !?u8 { | | |
| 245 | return pp.parser.eatByte(test_c); | | |
| 246 | } | | |
| 247 | | | |
| 248 | pub fn eatRange(pp: *T, comptime from: u8, comptime to: u8) !?u8 { | | |
| 249 | return pp.parser.eatRange(from, to); | | |
| 250 | } | | |
| 251 | | | |
| 252 | pub fn eatAnyScalar(pp: *T, test_s: string) !?u8 { | | |
| 253 | return pp.parser.eatAnyScalar(test_s); | | |
| 254 | } | | |
| 255 | | | |
| 256 | pub fn shift(pp: *T) !u21 { | | |
| 257 | return pp.parser.shift(); | | |
| 258 | } | | |
| 259 | | | |
| 260 | pub fn shiftBytesN(pp: *T, comptime n: usize) ![n]u8 { | | |
| 261 | return pp.parser.shiftBytesN(n); | | |
| 262 | } | | |
| 263 | | | |
| 264 | pub fn trimByte(pp: *T, test_c: u8) !usize { | | |
| 265 | return pp.parser.trimByte(test_c); | | |
| 266 | } | | |
| 267 | | | |
| 268 | pub fn eatUntil(pp: *T, test_c: u8) !?[2]usize { | | |
| 269 | return pp.parser.eatUntil(test_c); | | |
| 270 | } | | |
| 271 | | | |
| 272 | pub fn eatUntilStr(pp: *T, test_s: []const u8) !?[2]usize { | | |
| 273 | return pp.parser.eatUntilStr(test_s); | | |
| 274 | } | | |
| 275 | }; | | |
| 276 | } | | |