Skip to content
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

support Scratch 3.0 extensions #63

Open
pdawyndt opened this issue Jul 6, 2018 · 2 comments
Open

support Scratch 3.0 extensions #63

pdawyndt opened this issue Jul 6, 2018 · 2 comments
Milestone

Comments

@pdawyndt
Copy link

pdawyndt commented Jul 6, 2018

List of blocks from one or more extensions should be loaded dynamically in Scratch-LN. When embedding Scratch-LN in HTML or MarkDown, one should be able to pass a list of extensions.

@pdawyndt
Copy link
Author

In Scratch 3.0 both the pen blocks and the sound blocks have become extensions. Maybe these extensions should be supported natively by Scratch-LN.

@pdawyndt pdawyndt added this to the Thesis milestone Jul 23, 2018
@pdawyndt
Copy link
Author

pdawyndt commented Aug 1, 2018

To support Scratch 3.0 extensions in Scratch-LN, the following changes need to be made:

  • convert custom block specification of built-in Scratch blocks (blockspecification.js) by a block specification that follows the block specification for Scratch extensions; actually in order to take full opportunity of the extension mechanism of Scratch 3.0, the built-in Scratch 3.0 should also have been implemented as an extension; this way, Scratch-LN could immediately use the block specification of Scratch blocks to make sure that all built-in blocks are supported; now we have to adjust blockspecification.js each time a Scratch block is addded, removed or modified
  • revisit the support of C-blocks
    • dynamically inject C-block definitions in the lexer (keywords are all labels used in C-blocks) or make the grammar keyword-agnostic (defer handling of keyword to the visitor)
    • adjust parsing of C-blocks using one of the following options
      • dynamically create new grammar rules for C-blocks
      • defer handling of C-blocks to the visitor
      • use Python-style indentation for subblocks (would make it harder to use Scratch-LN in context that only support a single line)

Advantages:

  • generic support for built-in blocks and extensions; built-in blocks are treated as an extension that is automatically loaded
  • support translations of Scratch-LN itself, not only of the blocks it produces; this would require a way to handle the symbols used on the blocks (e.g. the symbols for the green flag, turn left and turn right, greater than, less than, ...) and the definition of alternative text for blocks (e.g. when green flag clicked, when gf clicked, when flag clicked); this would be in line with the primary design goal that Scratch-LN should stay as close as possible to the graphical way in which Scratch blocks are represented

@Ellen102 Ellen102 modified the milestones: Thesis, Future Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants