mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-05-07 03:50:55 -04:00
AST create / change / move / delete from blockly
This commit is contained in:
parent
53779220b7
commit
981b85e78f
22 changed files with 11858 additions and 381 deletions
38
README.md
38
README.md
|
@ -32,6 +32,44 @@ make build
|
|||
</script>
|
||||
```
|
||||
|
||||
## Abstract Syntax Tree
|
||||
|
||||
#### Overview
|
||||
|
||||
#### Anatomy of a Block
|
||||
```json
|
||||
{
|
||||
"id": "^1r~63Gdl7;Dh?I*OP3_",
|
||||
"opcode": "wedo_motorclockwise",
|
||||
"next": null,
|
||||
"fields": {
|
||||
"DURATION": {
|
||||
"name": "DURATION",
|
||||
"value": null,
|
||||
"blocks": {
|
||||
"1?P=eV(OiDY3vMk!24Ip": {
|
||||
"id": "1?P=eV(OiDY3vMk!24Ip",
|
||||
"opcode": "math_number",
|
||||
"next": null,
|
||||
"fields": {
|
||||
"NUM": {
|
||||
"name": "NUM",
|
||||
"value": "10",
|
||||
"blocks": null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"SUBSTACK": {
|
||||
"name": "SUBSTACK",
|
||||
"value": "@1ln(HsUO4!]*2*%BrE|",
|
||||
"blocks": null
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Testing
|
||||
```bash
|
||||
make test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue