Hi @LeuGim, Great help. I studied your code. At first, it feels like a magic. 
Then gradually, everything seems to be clear.

The things amazed me are--- 1. 
    
    
    var prop = i[0]
    
    
    Run

if i print prop, i can see this on screen. 
    
    
    num
    obj.str
    obj.obj.str
    obj.obj.obj.str
    
    
    Run

As perfect as i assumed. Then i see this line --- 
    
    
    case prop.kind
        of nnkIdent:
            dots.add prop
    
    
    Run

I printed dots on screen and got this. 
    
    
    @[num]
    @[str, obj]
    @[str, obj, obj]
    @[str, obj, obj, obj]
    
    
    Run

I think the order is re arranged, isn't it ? I expect @[obj, str] but it 
appeard like @[str, obj] Why ? Please explain the reason.

2\. This is the birilliant part. I can't imagine this before i see this code. 
Well, Thanks for this. 
    
    
    of nnkDotExpr:
        dots.add prop[1] # only one part is here
        prop = prop[0]   # all other parts are here
    
    
    Run

Due to this brilliancy, no need to use a recursive function.

At last, i can see these lines. 
    
    
    result.add quote do:
        `lhs` = `rhs`
        # the same without quote:
        #result.add newAssignment(lhs, rhs)
    
    
    Run

Ok, i understood. But i think i need to know more about quote. From this 
comment, all i can understand is quote can be used instead of "newAssignment". 
But one question is still rasing. What else we can do with quote ?

Reply via email to