Exemple #1
0
        public override AstNode Visit(UsingStatement node)
        {
            // Update the scope.
            PushScope(node.GetScope());

            // Visit his children.
            VisitList(node.GetChildren());

            // Restore the scope.
            PopScope();

            return node;
        }
        public override AstNode Visit(UsingStatement node)
        {
            // Create the pseudo-scope.
            PseudoScope scope = new PseudoScope(currentScope);

            // Store it in the node.
            node.SetScope(scope);

            // Change the ast layout to reflect the new scope hierarchy.
            node.SetChildren(node.GetNext());
            node.SetNext(null);

            // Update the scope.
            PushScope(node.GetScope());

            // Visit his children.
            VisitList(node.GetChildren());

            // Restore the scope.
            PopScope();

            return node;
        }