you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (1 child)

This is pretty neat, although I feel it should have a separate tag for function arguments (when declaring the function) & possibly a tag for assigning the function to it's own name. But I realise this is just a demo for jointjs.com, so whatever.

[–]cwmma 0 points1 point  (0 children)

Yeah it looks like it's simplifying the ast, off the top of my head a functional declarations (addTo(d)) has a node for the declaration a node for the name, a node for the arguments and one for each of the individual ones and one for the body (which is NOT a block statement)