You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Right now the JSON converter is using std.json to parse a tree of json.Value but this way we lose line and column information when producing diagnostics.
This means that right now we print error: missing field 'foo', but we can't tell at which line and column of the original json file this field was missing (ie where the surrounding object closes).
To make this happen, we need to switch to a different approach that involves not losing information about the original token stream.
One potentially interesting solution is to start from a JSON token stream and produce a Ziggy AST.
See src/cli/convert.zig for more information.
Also see #17 for the overall goal of completing ziggy convert.
The text was updated successfully, but these errors were encountered:
Right now the JSON converter is using
std.json
to parse a tree ofjson.Value
but this way we lose line and column information when producing diagnostics.This means that right now we print
error: missing field 'foo'
, but we can't tell at which line and column of the original json file this field was missing (ie where the surrounding object closes).To make this happen, we need to switch to a different approach that involves not losing information about the original token stream.
One potentially interesting solution is to start from a JSON token stream and produce a Ziggy AST.
See
src/cli/convert.zig
for more information.Also see #17 for the overall goal of completing
ziggy convert
.The text was updated successfully, but these errors were encountered: