-
Notifications
You must be signed in to change notification settings - Fork 20
Conjure‐blocks
N-J-Martin edited this page Feb 27, 2025
·
5 revisions
A block-editor web app for essence built using blockly
-
tutorials, in particular
-
block not defined
- this is likely caused by a change in block definition, so a block is stored in browser history that no longer exists.
- to fix, comment out the load session line in serialization.js, and rerun to empty the workspace history. You can then uncomment once fixed.
- Automated testing
- UX improvements
(backtrack from this branch, in new branch).
Method:
-
Copy tree-sitter style grammar from here, remove outer grammar() and import.
-
Write definitions for other predefined functions as follows:
- seq – formats arguments into message and arg list for block built from passed results. (main function for blocks)
- Repeat – adds an input that only accepts blocks that output Arrays/list (for the repetition)
- Choice – if all options are strings, then makes and block with the strings in a dropdown selection menu, otherwise gives the list of blocks that are part of the callers type. Used to determine input connection if argument of another function, otherwise is used to determine type inheritance and toolbox categories.
- Optional – as optional, always assume yes, so just returns the argument. (possible use of mutators in future)
- Prec – sets blocks precedence to number,
- Prec.left and Prec.right - essentially ignored as blockly needs precedence number.
-
Defined regex blocks as value blocks that only accept regex
-
Implement variable category for typed variables
The contents of this repository are licensed under the Mozilla Public Licence.