public override bool Walk(NameExpression node) { if (node.Name != null) { _binder.DefineName(node.Name); } return(false); }
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); } } }
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); } } }