Пример #1
0
        public override Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration)
        {
            WriteStart("");
            this.VisitTypeReference(variableDeclaration.Type);
            Write(" {0}", variableDeclaration.Name.Name);
            if (variableDeclaration.Initializer != null)
            {
                Write(" = ");
                this.Visit(variableDeclaration.Initializer);
            }
            WriteFinish(";");

            return variableDeclaration;
        }
Пример #2
0
 public virtual Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration)
 {
     if (variableDeclaration == null) return null;
     variableDeclaration.Type = this.VisitTypeReference(variableDeclaration.Type);
     variableDeclaration.Initializer = this.VisitExpression(variableDeclaration.Initializer);
     return variableDeclaration;
 }
Пример #3
0
 public override Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration)
 {
     if (variableDeclaration == null) return null;
     return base.VisitVariableDeclaration((VariableDeclaration)variableDeclaration.Clone());
 }
Пример #4
0
        // Override the Looker base to build a list of locals on the current method
        public override Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration)
        {
            if (variableDeclaration == null) return null;
            Statement result = base.VisitVariableDeclaration(variableDeclaration);

            ZMethod zMethod = this.currentMethod as ZMethod;
            Debug.Assert(zMethod != null);

            Field f = variableDeclaration.Field;
            zMethod.LocalVars.Add(f);

            return result;
        }
Пример #5
0
 public override Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration)
 {
     throw new NotImplementedException("Node type not yet supported");
 }
Пример #6
0
 public EventingVisitor(Action<VariableDeclaration> visitVariableDeclaration) { VisitedVariableDeclaration += visitVariableDeclaration; } public event Action<VariableDeclaration> VisitedVariableDeclaration; public override Statement VisitVariableDeclaration(VariableDeclaration variableDeclaration) { if (VisitedVariableDeclaration != null) VisitedVariableDeclaration(variableDeclaration); return base.VisitVariableDeclaration(variableDeclaration); }