Compare commits
No commits in common. "cf21c48771fd3e186f41d64d04c43d109a4a64d8" and "0e49d3f6aac90aa7380db59ccefc0e07c6287d1e" have entirely different histories.
cf21c48771
...
0e49d3f6aa
19
LICENSE
19
LICENSE
@ -1,19 +0,0 @@
|
|||||||
Copyright (c) 2024 torque@epicyclic.dev
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
|
||||||
this software and associated documentation files (the "Software"), to deal in
|
|
||||||
the Software without restriction, including without limitation the rights to
|
|
||||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
|
||||||
of the Software, and to permit persons to whom the Software is furnished to do
|
|
||||||
so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
13
build.zig
13
build.zig
@ -20,17 +20,14 @@ pub fn build(b: *std.Build) void {
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
|
|
||||||
const example_step = b.step("example", "build example");
|
const exe = b.addExecutable(.{
|
||||||
|
|
||||||
const ex_exe = b.addExecutable(.{
|
|
||||||
.name = "yamltest",
|
.name = "yamltest",
|
||||||
.root_source_file = .{ .path = "example/main.zig" },
|
.root_source_file = .{ .path = "src/main.zig" },
|
||||||
.target = target,
|
.target = target,
|
||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
ex_exe.linkLibrary(libyaml);
|
exe.linkLibrary(libyaml);
|
||||||
ex_exe.addModule("yaml", yaml_zig);
|
exe.addModule("yaml", yaml_zig);
|
||||||
|
|
||||||
const install = b.addInstallArtifact(ex_exe, .{});
|
b.installArtifact(exe);
|
||||||
example_step.dependOn(&install.step);
|
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
.{
|
.{
|
||||||
.name = "zaye",
|
.name = "libyaml.zig",
|
||||||
.version = "0.0.1",
|
.version = "0.0.1",
|
||||||
.paths = .{
|
.paths = .{
|
||||||
"src",
|
"src",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# ZAYE Ain't a Yaml Emitter
|
# ZAYE Ain't a Yaml Emitter
|
||||||
|
|
||||||
zaye is a very simple libyaml-based YAML parser for zig. In the spirit of describing
|
zaye is a very simple libyaml-based YAML parser for zig. In the spirit of describing
|
||||||
things by defining what they aren't, it is not capable of emitting YAML. If that
|
things by defining what they aren't, it is not capable of emitting YAML. If this
|
||||||
changes in the future, then this will have been a poor naming choice.
|
changes in the future, then this will have been a poor naming choice.
|
||||||
|
|
||||||
## Status
|
## Status
|
||||||
|
@ -7,14 +7,11 @@ pub fn main() !void {
|
|||||||
defer _ = gpa.deinit();
|
defer _ = gpa.deinit();
|
||||||
const allocator = gpa.allocator();
|
const allocator = gpa.allocator();
|
||||||
|
|
||||||
const slurp = std.fs.cwd().readFileAlloc(
|
const slurp = try std.fs.cwd().readFileAlloc(
|
||||||
allocator,
|
allocator,
|
||||||
"test.yaml",
|
"test.yaml",
|
||||||
1024 * 1024 * 1024,
|
1024 * 1024 * 1024,
|
||||||
) catch |err| {
|
);
|
||||||
std.debug.print("couldn't open test.yaml in the cwd\n", .{});
|
|
||||||
return err;
|
|
||||||
};
|
|
||||||
defer allocator.free(slurp);
|
defer allocator.free(slurp);
|
||||||
|
|
||||||
var diag = yaml.ParseDiagnostic{ .message = "?????" };
|
var diag = yaml.ParseDiagnostic{ .message = "?????" };
|
Loading…
x
Reference in New Issue
Block a user