Created
February 28, 2021 07:57
-
-
Save emidoots/94a5af2290413103d08d4de903e1d0d1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const std = @import("std"); | |
const testing = std.testing; | |
const Reader = struct { | |
reader: anytype, | |
seekableStream: anytype, | |
}; | |
const Node = struct { | |
value: isize, | |
}; | |
const Parser = struct { | |
run: fn(src: *Reader) ?Node, | |
}; | |
fn literal(s: []const u8) Parser { | |
return struct { | |
pub const parser = Parser{.run = run}; | |
fn run(src: *Reader) !?Node { | |
const b = try src.reader.readByte(); | |
std.debug.print("efg{s}\n", b); | |
return Node{.value = 2}; | |
} | |
}.parser; | |
} | |
test "basic" { | |
const x = literal("foobar"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Assertion failed at /Users/runner/work/1/s/src/stage1/analyze.cpp:618 in get_pointer_to_type_extra2. This is a bug in the Zig compiler.The following command terminated unexpectedly: | |
/usr/local/bin/zig test /Users/slimsag/Desktop/hexops/zorex/src/main.zig --cache-dir /Users/slimsag/Desktop/hexops/zorex/zig-cache --global-cache-dir /Users/slimsag/.cache/zig --name test | |
error: the following build command failed with exit code 1: | |
/Users/slimsag/Desktop/hexops/zorex/zig-cache/o/4c9b225345d60ec9a2b8330ba28221e7/build /usr/local/bin/zig /Users/slimsag/Desktop/hexops/zorex /Users/slimsag/Desktop/hexops/zorex/zig-cache /Users/slimsag/.cache/zig test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0.8.0-dev.1146+a448210fc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment