threeaccents

threeaccents OP

Yea I don’t use real atoms anywhere in the code. What I ended up doing is in the parsing stage whenever I need to “create” and atom I actually create a string with a placeholder for later use in the eval step.

You can see an example of it being used here

And the actual atom function that sets the placeholder:.

Then in the eval step all we do is generate the code with the Macro.to_string helper and regex out the placeholder atom to a “real” but not really a real atom.

1
Post #11
threeaccents

threeaccents OP

@yangm97 Thank you! Issue has been resolved! The lexer wasn’t handling negative numbers. Give it a try and let me know if it works!

1
Post #12
yangm97

yangm97

Thank you for your tool! It now works as expected… well kind of.
I noticed it duplicates/attempts to redefine recursive data structures instead of normalizing and defining them once.

0
Post #13
threeaccents

threeaccents OP

What do you mean by this? Do you have an example?

0
Post #14
yangm97

yangm97

Sure! You can see that happening on my previous JSON. Some entities are being defined multiple times with varying properties, instead of being merged as a single entity composed of all properties inferred by each instance.

0
Post #15
— All posts loaded —