es6 support in droplet

5 views
Skip to first unread message

Evan Cole

unread,
Apr 3, 2019, 1:08:25 PM4/3/19
to pencilcode-...@googlegroups.com
Hello Team Pencilcode.

I’ve had good luck with pencil code before teaching kids, toggling between blocks & code makes all the difference. Over the last weeks I’ve been starting to use droplet with adults to teach JS, editing in droplet and pasting into the console.  This works great, after the initial « isn’t blocks for kids? » they really get into it.  

So I’m now working on a series of study tools/environments that build around in-browser blocks-based editing (blockitcode-along).  To fully bring the blocks to an adult audience the editor would need to recognize ES6.  
I’ve figured out how to add new blocks and methods to droplet, but am having trouble finding my way through antlr, acorn & javascript.coffee to add language features it doesn’t yet parse.  like ‘let’, ()=>{}, ? : , and spread/rest.  I’ve tried using a newer version of acorn, but that wasn’t enough (i’m assuming that the droplet in your organization doesn’t, since the last commit was 2016).

Do you have any tips for how to go ahead with this?  Or any plans on your side to implement ES6?

All the best,

Evan


Reply all
Reply to author
Forward
0 new messages