コード例 #1
0
 public void Visit(ExpandIterationVariable variable)
 {
     _codeStack.Peek().Scope = new ScopeData <Type> {
         Type = typeof(int), CodeDomReference = new CodeTypeReference(typeof(int))
     };
     _codeStack.Peek().CodeExpression = new CodeVariableReferenceExpression("x");
 }
コード例 #2
0
ファイル: BridgeVisitor.cs プロジェクト: jeason0813/pickaxe
        public void Visit(ExpandExpression expression, CommonTree tree)
        {
            Parent(tree).Children.Add(expression);
            SetLine(expression, tree);
            VisitChildren(tree);

            if (tree.ChildCount < 3) //if no expand expression we just add the default iteration variable
            {
                var iterationVariable = new ExpandIterationVariable();
                expression.Children.Add(iterationVariable);
            }
        }
コード例 #3
0
ファイル: BridgeVisitor.cs プロジェクト: jeason0813/pickaxe
 public void Visit(ExpandIterationVariable variable, CommonTree tree)
 {
     Parent(tree).Children.Add(variable);
 }