Пример #1
0
 public override bool Walk(NameExpression node)
 {
     if (node.Name != null)
     {
         _binder.DefineName(node.Name);
     }
     return(false);
 }
Пример #2
0
 private void WalkTuple(TupleExpression tuple)
 {
     foreach (Expression innerNode in tuple.Items)
     {
         NameExpression name = innerNode as NameExpression;
         if (name != null)
         {
             _binder.DefineName(name.Name);
             name.AddVariableReference(_binder._globalScope, _binder._bindRefs, _binder.Reference(name.Name));
         }
         else if (innerNode is TupleExpression)
         {
             WalkTuple((TupleExpression)innerNode);
         }
     }
 }
Пример #3
0
        private void WalkTuple(TupleExpression tuple)
        {
            tuple.Parent = _binder._currentScope;
            foreach (Expression innerNode in tuple.Items)
            {
                NameExpression name = innerNode as NameExpression;
                if (name != null)
                {
                    _binder.DefineName(name.Name);
                    name.Parent = _binder._currentScope;
#if NAME_BINDING
                    name.Reference =
#endif
                    _binder.Reference(name.Name);
                }
                else
                {
                    WalkTuple((TupleExpression)innerNode);
                }
            }
        }