3 ms·
That's because the representation of that AST seems to be defined in terms of Python's objects, so it looks unwieldy. Compare with Lisp: Code: x AST: x Code
by TeMPOraL 10y ago
That's because the representation of that AST seems to be defined in terms of Python's objects, so it looks unwieldy.
Compare with Lisp:
Code: x
AST: x
Code: (let ((x 5)) (+ x x))
AST: (let ((x 5)) (+ x x))
And as for the very little syntactic sugar most Lisps have:
Code: 'x
AST: (quote x)
:).
- closed 10y agoAh, that helps a lot--thanks for the example! Most ASTs I've have seen look much more gruesome than that. That AST looks straight delightful. (actually now that I think about it, R may do something a bit similar)
- jiyinyiyong 10y agoAnd we can map Cirru AST to a language AST like I did in http://script.cirru.org/ http://script.cirru.org/ ;)