コード例 #1
0
 public void Visit(WithNode withNode)
 {
     withNode.Target.Parent = withNode;
     withNode.Target.Accept(this);
     withNode.Body.Parent = withNode;
     withNode.Body.Accept(this);
 }
コード例 #2
0
ファイル: Formatter.cs プロジェクト: zhoffice/nodejstools
 public override bool Walk(WithNode node)
 {
     if (CheckBlock(node.Body))
     {
         Span = GetTargetStatement(node).GetSpan(_tree.LocationResolver);
         return(false);
     }
     return(base.Walk(node));
 }
コード例 #3
0
        public virtual void Visit(WithNode node)
        {
            if (node != null)
            {
                if (node.WithObject != null)
                {
                    node.WithObject.Accept(this);
                }

                if (node.Body != null)
                {
                    node.Body.Accept(this);
                }
            }
        }
コード例 #4
0
        public void Accept(WithNode node)
        {
            table.EnterScope();
            node.Target.Visit(this);

            var assign = node.Assign == string.Empty ? nextLabel().ToString() : node.Assign;
            var sym    = table.HandleSymbol(assign);

            emit(node.SourceLocation, InstructionType.StoreLocal, sym);

            emit(node.SourceLocation, InstructionType.EnterWith, sym);
            if (node.Body is CodeBlockNode)
            {
                node.Body.VisitChildren(this);
            }
            else
            {
                node.Body.Visit(this);
            }
            emit(node.SourceLocation, InstructionType.ExitWith, sym);
            table.LeaveScope();
        }
コード例 #5
0
ファイル: OverviewWalker.cs プロジェクト: tbscer/nodejstools
 public override bool Walk(WithNode node)
 {
     UpdateChildRanges(node);
     return(base.Walk(node));
 }
コード例 #6
0
 public override bool Walk(WithNode node)
 {
     AddNode(node); return(true);
 }
コード例 #7
0
ファイル: TreeVisitor.cs プロジェクト: nuxleus/ajaxmin
 public virtual void Visit(WithNode node)
 {
     if (node != null)
     {
          AcceptChildren(node);
     }
 }
コード例 #8
0
 public void Visit(WithNode node)
 {
     // not applicable; terminate
 }
コード例 #9
0
ファイル: AstVisitor.cs プロジェクト: lioaphy/nodejstools
 public virtual bool Walk(WithNode node) { return true; }
コード例 #10
0
ファイル: AstVisitor.cs プロジェクト: lioaphy/nodejstools
 public virtual void PostWalk(WithNode node) { }
コード例 #11
0
 public virtual void PostWalk(WithNode node)
 {
 }
コード例 #12
0
 public virtual bool Walk(WithNode node)
 {
     return(true);
 }
コード例 #13
0
        public virtual void Visit(WithNode node)
        {
            if (node != null)
            {
                if (node.WithObject != null)
                {
                    node.WithObject.Accept(this);
                }

                if (node.Body != null)
                {
                    node.Body.Accept(this);
                }
            }
        }