Closed novusnota closed 1 month ago
Can you add here some sample for the smart contract code that can be used to test the new features on the parser side? To test the new changes quickly we can use https://peggyjs.org/online.html
@logvik thanks for the suggestion! I've refined the parser and checked that it works as intended on https://peggyjs.org/online.html. Also added a samples/
folder (and adjusted .vscodeignore
) and placed the first sample with asm
functions there. They were taken from the tests of grammar.ohm
in Tact compiler repo.
LGTM! @logvik could you please leave your feedback? We would like to move on with Tact v1.5 support
I will update the extension on the marketplace this evening. Let's publish this PR and then I will add more, just don't have a time right now to test my own additional changes careful.
Awesome! Thanks a bunch
This code is from samples/items-asm-func.tact
I think we should fix this before publishing on the marketplace.
@logvik that file was to test parsers only (pegjs here and Ohm in Tact compiler) and it wasn't really valid from semantical point of view. Only syntax there mattered :)
Also, to fix this exact snippet, try removing the first 1
It didn't help, but I have published because that error was related to the compiler warning, as you have been mentioned above.
Wanted to help out a little, please review whenever you find convenient
Changes
asm
functions in the parserNotes
pegjs used in the project can be seamlessly replaced by its maintained version — peggyjs (repo). There are only three small steps for migration: https://github.com/peggyjs/peggy#migrating-from-pegjs
The current parser seems to be a tangled amalgamation of JavaScript, FunC and Tact parsers, none of which is complete nor correct. JavaScript made the biggest influence with its ASI, import...from statements, and other weird leftovers. Very tough to do anything productive with from the outside standpoint, just my 2 cents :heart: :)
I hope I didn't butcher the formatting and did things there right. Please, double-check and/or correct :pray:
Closes #44