Skip to content
Snippets Groups Projects
  • Erwan Jahier's avatar
    65b93560
    Add support to be able to use iterators in node aliases. · 65b93560
    Erwan Jahier authored
    Also, node aliased to other nodes were handled poorly: I was replacing
    in the syntax tree the node by its alias. Now, I really define
    the alias node using the aliases one.
    
    For instance,
    
        node toto(x:t) returns (y:t);
        let
          ...
         tel
         node titi = toto;
         node tutu(...) returns(...);
         let
            ...
    	z = titi(a);
         tel
    
    was compiled into
    
        node toto(x:t) returns (y:t);
        let
          ...
         tel
    
         node tutu(...) returns(...);
         let
            ...
    	z = toto(a);
         tel
    
    Now, I generate
    
         node toto(x:t) returns (y:t);
         let
           ...
         tel
         node titi(i1:t) returns (o1:t);
         let
           o1 =toto(i1);
         tel
         node tutu(...) returns(...);
         let
            ...
    	z = titi(a);
         tel
    
    which is equivalent, but closer to the original program.
    65b93560
    History
    Add support to be able to use iterators in node aliases.
    Erwan Jahier authored
    Also, node aliased to other nodes were handled poorly: I was replacing
    in the syntax tree the node by its alias. Now, I really define
    the alias node using the aliases one.
    
    For instance,
    
        node toto(x:t) returns (y:t);
        let
          ...
         tel
         node titi = toto;
         node tutu(...) returns(...);
         let
            ...
    	z = titi(a);
         tel
    
    was compiled into
    
        node toto(x:t) returns (y:t);
        let
          ...
         tel
    
         node tutu(...) returns(...);
         let
            ...
    	z = toto(a);
         tel
    
    Now, I generate
    
         node toto(x:t) returns (y:t);
         let
           ...
         tel
         node titi(i1:t) returns (o1:t);
         let
           o1 =toto(i1);
         tel
         node tutu(...) returns(...);
         let
            ...
    	z = titi(a);
         tel
    
    which is equivalent, but closer to the original program.