That’s a really nice initiative, I like it! What did you use to generate the axon.js and haystack.js files in the src folder? They do not seem manually crafted and there is no parser grammar file in the repository. Did you code those huge files manually?
I really wanted to leverage Haxall's Axon parser, but Haxall is Fantom and Prettier is javascript, so eventually I found that the Haxall folks are releasing the javascript build of Haxall to npm, and that's what I used.
The only issue is that Prettier requires precise character locations for every token, and Haxall's parser doesn't track locations that closely. So I quickly hacked the location tracking into the javascript parser, and that's what the axon.js and haystack.js files are.
My hope is that the code formatter will be useful for all, and that I can work with the Haxall team to add precise location tracking in the Fantom source.
Ryan Mulder Tue 29 Apr
We've developed a plugin for the Prettier opinionated code formatter to support Haxall languages - Axon, Fantom, Trio, Zinc, etc.
Axon is the initial focus, with just enough Trio and Zinc support to handle Axon in Trio.
We're using it for 100% of our Axon development now, and hopefully it is useful for others.
Feedback and contributions are welcome!
https://github.com/AntrumIAQ/prettier-plugin-haxall
Aurelien Ribon Tue 29 Apr
That’s a really nice initiative, I like it! What did you use to generate the axon.js and haystack.js files in the src folder? They do not seem manually crafted and there is no parser grammar file in the repository. Did you code those huge files manually?
Ryan Mulder Tue 29 Apr
They come from the @haxall/haxall npm module.
I really wanted to leverage Haxall's Axon parser, but Haxall is Fantom and Prettier is javascript, so eventually I found that the Haxall folks are releasing the javascript build of Haxall to npm, and that's what I used.
The only issue is that Prettier requires precise character locations for every token, and Haxall's parser doesn't track locations that closely. So I quickly hacked the location tracking into the javascript parser, and that's what the
axon.js
andhaystack.js
files are.My hope is that the code formatter will be useful for all, and that I can work with the Haxall team to add precise location tracking in the Fantom source.