-
Notifications
You must be signed in to change notification settings - Fork 3
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
Is there any way to traverse each field of a zon? #4
Comments
I can't think of a simple way to do that with or without zon_get_fields. zon_get_fields is based on the assumption that the user (you) knows the structure of the ZON text they want to read / parse / get values from.
If I were to solve this problem, I'd take a look at the way This, of course, would require some work on your part. |
Here's a quick and dirty solution I came up with: It works when "dependencies" is either a struct, or an array of structs (see the code that is commented out in Feel free to do with this code whatever you want. Hope this helps. |
nice work |
@jinzhongjia - I'm going to close this issue, if this is OK with you. |
I want to parse the build.zig.zon file and get all the dependencies
The text was updated successfully, but these errors were encountered: