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

keywords alone cannot be considered as part of the description of a block #64

Open
Ellen102 opened this issue Jul 8, 2018 · 0 comments
Labels
grammar This issue requires changes to the grammar limitation This is a limitation compared to what is possible in Scratch.
Milestone

Comments

@Ellen102
Copy link
Member

Ellen102 commented Jul 8, 2018

Custom blocks where a keyword (if,else,end, forever, ...) stands alone as part of the description of the block, are not valid.
For example:

  1. if { } jump {} times
  2. jump with height {} if {}
  3. when {} end

The parser sees the if as a keyword not as a label.
Possible solutions:

  • for 2 and 3: match the token only when the token it is at the beginning of a line: begin of file or after a delimiter(assumed whitespace skipped).
  • for 1: something with a lookahead.

note:

  • if I make the keywords part of the category label the atomic rule is selected above the composite rules.
@Ellen102 Ellen102 added grammar This issue requires changes to the grammar limitation This is a limitation compared to what is possible in Scratch. labels Jul 8, 2018
@Ellen102 Ellen102 added this to the Future milestone Aug 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grammar This issue requires changes to the grammar limitation This is a limitation compared to what is possible in Scratch.
Projects
None yet
Development

No branches or pull requests

1 participant