Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
We should also rename our existing editors to CommandSequence...Editor rather than Program...Editor as they operate on command sequences in our new model.
Activity
Show:
Daniel Cho November 5, 2019 at 3:37 PM
Yeah, I realized that I was thinking way ahead as well. That sounds great
Simon Bates November 5, 2019 at 3:32 PM
Yeah, we'll definitely want to support persistence of custom commands and programs. I think we can tackle that a little later, when our program/project model is more evolved. In the overall project plan, we've got persistence scheduled for the next milestone: milestone 3 January-June 2020.
Daniel Cho November 5, 2019 at 3:08 PM
We need to think about how we are going to store custom commands – maybe web storage API if we are planning to store them locally, and I think it is valuable approach to make them sharable to other people too.
Modify the Interpreter to be able to run programs with Custom Commands.
Rename the existing
Program
type toCommandSequence
and add a newProject
type that includes Custom Commands:export type CommandSequence = Array<string>; export type Project = { customCommands: { [command: string]: CommandSequence }, program: CommandSequence };
Example project:
{ customCommands: { square: ["forward", "left", "forward", "left", "forward", "left", "forward"] }, program: ["square", "square"] }
Test cases:
Project with empty
program
and emptycustomCommands
Project with
program
command sequence but nocustomCommands
Project with
program
andcustomCommands
Program with undefined commands (no registered command handlers or custom commands)
Redefinition of built-in commands (command handlers)
Recursion
See the discussion of command redefinition and recursion at https://wiki.fluidproject.org/display/C2LC/Custom+Blocks
We should also rename our existing editors to
CommandSequence...Editor
rather thanProgram...Editor
as they operate on command sequences in our new model.