> I think the order is re arranged, isn't it ?

No, it isn't. Parts are extracted in this order. They are mostly from `dots.add 
prop[1]`, and `prop[1]` is always the last remaining part in the tree (as 
noticed in comments), taking it into `dots`, we then deal with others, 
assigning the rest (`prop[0]`) to `prop`, then it's repeated, so we're 
unwinding the tree by taking each time the last element. Just the tree for 
nested dot-expression is always nested at left branches: `prop[1]` is an atom, 
so cab just taken, and `prop[0]` \- the rest of the tree. Just study 
`treeRepr`'s outputs, you'll see what's going on.

> What else we can do with quote ?

Mm... everything. Just like templates inside macros. Yet another way of 
constructing AST - something between string manipulation (`parseStmt`) and 
nodes building (this example). There is another example for it in the code. And 
just write any Nim code in it and use backticks to insert code from a variable 
of the macro. 

Reply via email to