Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a build step to generate dafsa from a def file #525

Merged
merged 4 commits into from
Oct 19, 2023
Merged

Add a build step to generate dafsa from a def file #525

merged 4 commits into from
Oct 19, 2023

Conversation

Vexu
Copy link
Owner

@Vexu Vexu commented Oct 16, 2023

This mostly works except for an ever so pesky "file exists in multiple modules" error.

Also give it up for the first DSL in Aro!

@Vexu Vexu force-pushed the build-step branch 5 times, most recently from 7a01eb6 to 81f61f5 Compare October 16, 2023 20:51
@ehaas
Copy link
Collaborator

ehaas commented Oct 19, 2023

This fixes the extra space in the output for me:

diff --git a/src/Tree.zig b/src/Tree.zig
index 91d1035..c3bc67c 100644
--- a/src/Tree.zig
+++ b/src/Tree.zig
@@ -703,7 +703,7 @@ fn dumpAttribute(attr: Attribute, strings: []const u8, writer: anytype) !void {
     switch (attr.tag) {
         inline else => |tag| {
             const args = @field(attr.args, @tagName(tag));
-            if (@TypeOf(args) == void) {
+            if (@typeInfo(@TypeOf(args)).Struct.fields.len == 0) {
                 try writer.writeByte('\n');
                 return;
             }

@Vexu Vexu merged commit 57fe911 into master Oct 19, 2023
3 checks passed
@Vexu Vexu deleted the build-step branch October 19, 2023 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants