-
Notifications
You must be signed in to change notification settings - Fork 10
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
Macro support #49
Comments
Most of the constraints regarding macro names in TEAL are resolved by the Tealish Const pattern
would not expand known_item to "macro tealishbox macro". TEAL macros can not, however, be named after field names, stuch as "ApplicationID", or "RekeyTo", or "VoteLast", or "Sender", or a dozen or so others. One way around this might be to detect them using the TEAL langspec.json and erroring out or possibly postfixing the name automatically with one of the allowable TEAL special characters disallowed in Tealish consts (like %). |
This looks great! It definitely improves the Teal output and is a very simple change. If there is still a possibility for conflicts still we can definitely make use of the langspec. Before opening a PR for this I'll warn you there is significant work on the |
Nice! I did notice the inconsistency between the code and the docs but I went with the code. There are no all-cap field names at the moment (although TxID comes close), and I suppose there is no guarantee there won't be in the future, but that solution (all caps + numbers + underscore) is workable at the moment. |
algorand/go-algorand#4737 is introducing support for macros in TEAL.
One useful thing to do with macros is use them to define the constants Tealish supports.
I believe the following patch will enable that:
this will result in tealish that goes from
to TEAL
The text was updated successfully, but these errors were encountered: