Compare commits
No commits in common. "a9f2298132fc238ec369cbe03de65a31ab0d0167" and "27667032e14010618af036bfd2fa2704c01a2a58" have entirely different histories.
a9f2298132
...
27667032e1
@ -9,8 +9,10 @@ pub fn build(b: *std.Build) void {
|
|||||||
const optimize = b.standardOptimizeOption(.{});
|
const optimize = b.standardOptimizeOption(.{});
|
||||||
|
|
||||||
const yaml_zig = b.addModule("zaye", .{
|
const yaml_zig = b.addModule("zaye", .{
|
||||||
.root_source_file = .{ .path = "src/zaye.zig" },
|
.source_file = .{ .path = "src/zaye.zig" },
|
||||||
});
|
});
|
||||||
|
// yaml_zig.addIncludePath(.{ .path = b.getInstallPath(.header, "") });
|
||||||
|
// _ = yaml_zig;
|
||||||
|
|
||||||
const libyaml = libyaml_build.libyamlLib(b, .{
|
const libyaml = libyaml_build.libyamlLib(b, .{
|
||||||
.name = "libyaml",
|
.name = "libyaml",
|
||||||
@ -27,7 +29,7 @@ pub fn build(b: *std.Build) void {
|
|||||||
.optimize = optimize,
|
.optimize = optimize,
|
||||||
});
|
});
|
||||||
ex_exe.linkLibrary(libyaml);
|
ex_exe.linkLibrary(libyaml);
|
||||||
ex_exe.root_module.addImport("yaml", yaml_zig);
|
ex_exe.addModule("yaml", yaml_zig);
|
||||||
|
|
||||||
const install = b.addInstallArtifact(ex_exe, .{});
|
const install = b.addInstallArtifact(ex_exe, .{});
|
||||||
example_step.dependOn(&install.step);
|
example_step.dependOn(&install.step);
|
||||||
|
@ -5,7 +5,7 @@ const std = @import("std");
|
|||||||
|
|
||||||
const LibyamlOptions = struct {
|
const LibyamlOptions = struct {
|
||||||
name: []const u8,
|
name: []const u8,
|
||||||
target: std.Build.ResolvedTarget,
|
target: std.zig.CrossTarget,
|
||||||
optimize: std.builtin.OptimizeMode,
|
optimize: std.builtin.OptimizeMode,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ pub fn libyamlLib(
|
|||||||
|
|
||||||
lib.linkLibC();
|
lib.linkLibC();
|
||||||
lib.addIncludePath(.{ .path = include_prefix });
|
lib.addIncludePath(.{ .path = include_prefix });
|
||||||
lib.addCSourceFiles(.{ .files = &sources, .flags = &cflags });
|
lib.addCSourceFiles(&sources, &cflags);
|
||||||
lib.defineCMacro("YAML_VERSION_MAJOR", "0");
|
lib.defineCMacro("YAML_VERSION_MAJOR", "0");
|
||||||
lib.defineCMacro("YAML_VERSION_MINOR", "2");
|
lib.defineCMacro("YAML_VERSION_MINOR", "2");
|
||||||
lib.defineCMacro("YAML_VERSION_PATCH", "5");
|
lib.defineCMacro("YAML_VERSION_PATCH", "5");
|
||||||
|
@ -266,7 +266,7 @@ pub const Value = union(enum) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn endMap(self: *Builder, diag: *ParseDiagnostic) !void {
|
fn endMap(self: *Builder, diag: *ParseDiagnostic) !void {
|
||||||
const top = self.container_stack.pop();
|
var top = self.container_stack.pop();
|
||||||
|
|
||||||
if (top != .map) {
|
if (top != .map) {
|
||||||
diag.setMessage("map ended when a map was not the top container");
|
diag.setMessage("map ended when a map was not the top container");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user