Open maribethb opened 1 year ago
Additional confusion in #7302
@BeksOmega I'm going to add one sentence to this page saying there is more you have to do than just this, go look at the existing generators. But this might be a good candidate for your next batch of work after renderers :)
Also additional confusion here about the tuple message for value blocks. imo the generator docs should have a heading for value blocks that is easy to link to, unlike today's https://groups.google.com/g/blockly/c/a3ZMp_0Sg2M
Location
https://developers.google.com/blockly/guides/create-custom-blocks/generating-code
Type
Suggested content
The current page explains how to add a block generator to an existing language generator. It doesn't explain how to create a new language generator entirely. We have the custom generator codelab, but as it is a simple generator, it glosses over some of the details.
In particular, we should tell people about the init method and what kinds of things they may want to initialise there, like the nameDB_.
In lieu of comprehensive text documentation, we could at least encourage people to view the current generators to see what else they may need to initialize. The codelab is a bit misleading here because it covers calling the Generator constructor but doesn't really tell you there might be more things to init.
Additional context
https://groups.google.com/g/blockly/c/j7MfufrANkM