Esempio n. 1
0
 private void Build(DIteratorLiteral node, Hints hints, CompilerContext ctx)
 {
     if (node.YieldBlock.Elements.Count is 1 && node.YieldBlock.Elements[0].NodeType == NodeType.Range)
     {
         Build(node.YieldBlock.Elements[0], hints.Append(Push), ctx);
         PopIf(hints);
     }
Esempio n. 2
0
        private void Build(DIteratorLiteral node, Hints hints, CompilerContext ctx)
        {
            var dec = new DFunctionDeclaration(node.Location)
            {
                Body = node.YieldBlock
            };

            Build(dec, hints.Append(Iterator), ctx);
        }