// EnterNode is invoked at every node in hierarchy
432439
func (d *GoDumper) EnterNode(w walker.Walkable) bool {
	n := w.(node.Node)

	nodeType := reflect.TypeOf(n).String()
	nodeType = strings.Replace(nodeType, "*", "&", 1)

	if d.isChildNode {
		d.isChildNode = false
	} else {
		printIndent(d.Writer, d.depth)
	}

	io.WriteString(d.Writer, nodeType+"{\n")

	d.depth++

	if p := n.GetPosition(); p != nil {
		printIndent(d.Writer, d.depth)
		fmt.Fprint(d.Writer, "Position: &position.Position{\n")
		d.depth++
		printIndent(d.Writer, d.depth)
		fmt.Fprintf(d.Writer, "StartLine: %d,\n", p.StartLine)
		printIndent(d.Writer, d.depth)
		fmt.Fprintf(d.Writer, "EndLine: %d,\n", p.EndLine)
		printIndent(d.Writer, d.depth)
		fmt.Fprintf(d.Writer, "StartPos: %d,\n", p.StartPos)
		printIndent(d.Writer, d.depth)
		fmt.Fprintf(d.Writer, "EndPos: %d,\n", p.EndPos)
		d.depth--
		printIndent(d.Writer, d.depth)
		fmt.Fprint(d.Writer, "},\n")
	}

	if !n.GetFreeFloating().IsEmpty() {
		printIndent(d.Writer, d.depth)
		fmt.Fprint(d.Writer, "FreeFloating: freefloating.Collection{\n")
		d.depth++
		for key, freeFloatingStrings := range *n.GetFreeFloating() {
			printIndent(d.Writer, d.depth)
			fmt.Fprintf(d.Writer, "%q: []freefloating.String{\n", key)
			d.depth++

			for _, freeFloatingString := range freeFloatingStrings {
				printIndent(d.Writer, d.depth)
				fmt.Fprint(d.Writer, "freefloating.String{\n")
				d.depth++

				printIndent(d.Writer, d.depth)

				switch freeFloatingString.StringType {
				case freefloating.CommentType:
					fmt.Fprint(d.Writer, "Type: freefloating.CommentType,\n")
				case freefloating.WhiteSpaceType:
					fmt.Fprint(d.Writer, "Type: freefloating.WhiteSpaceType,\n")
				case freefloating.TokenType:
					fmt.Fprint(d.Writer, "Type: freefloating.TokenType,\n")
				}

				printIndent(d.Writer, d.depth)

				if freeFloatingString.Position != nil {
					fmt.Fprint(d.Writer, "Position: &position.Position{\n")
					d.depth++
					printIndent(d.Writer, d.depth)
					fmt.Fprintf(d.Writer, "StartLine: %d,\n", freeFloatingString.Position.StartLine)
					printIndent(d.Writer, d.depth)
					fmt.Fprintf(d.Writer, "EndLine: %d,\n", freeFloatingString.Position.EndLine)
					printIndent(d.Writer, d.depth)
					fmt.Fprintf(d.Writer, "StartPos: %d,\n", freeFloatingString.Position.StartPos)
					printIndent(d.Writer, d.depth)
					fmt.Fprintf(d.Writer, "EndPos: %d,\n", freeFloatingString.Position.EndPos)
					d.depth--
					printIndent(d.Writer, d.depth)
					fmt.Fprint(d.Writer, "},\n")
				} else {
					fmt.Fprint(d.Writer, "Position: nil,\n")
				}

				printIndent(d.Writer, d.depth)
				fmt.Fprintf(d.Writer, "Value: %q,\n", freeFloatingString.Value)

				d.depth--
				printIndent(d.Writer, d.depth)
				fmt.Fprint(d.Writer, "},\n")
			}

			d.depth--
			printIndent(d.Writer, d.depth)
			fmt.Fprint(d.Writer, "},\n")
		}
		d.depth--
		printIndent(d.Writer, d.depth)
		fmt.Fprint(d.Writer, "},\n")
	}

	if a := n.Attributes(); len(a) > 0 {
		for key, attr := range a {
			printIndent(d.Writer, d.depth)
			switch attr.(type) {
			case string:
				fmt.Fprintf(d.Writer, "%s: %q,\n", key, attr)
			default:
				fmt.Fprintf(d.Writer, "%s: %v,\n", key, attr)
			}
		}
	}

	return true
}
612542
func (v *Context) Enter(title string, args ...interface{}) {
	e := fmt.Sprintf(title, args...)
	v.element = append(v.element, e)
}
1208467
func (nb *NodeBuilder) TextNode(text string) error {
	if nb.done {
		return errors.New(ErrBuilder, errorMessages, "building is already done")
	}
	if len(nb.stack) > 0 {
		nb.stack[len(nb.stack)-1].appendTextNode(text)
		return nil
	}
	return errors.New(ErrBuilder, errorMessages, "no opening tag for text")
}
65346
func WalkNodes(n *exphtml.Node, f func(*exphtml.Node)) {
	if n != nil {
		f(n)
		for c := n.FirstChild; c != nil; c = c.NextSibling {
			WalkNodes(c, f)
		}
	}
}
646717
func (n *PrivElem) Accept(v Visitor) (Node, bool) {
	newNode, skipChildren := v.Enter(n)
	if skipChildren {
		return v.Leave(newNode)
	}
	n = newNode.(*PrivElem)
	for i, val := range n.Cols {
		node, ok := val.Accept(v)
		if !ok {
			return n, false
		}
		n.Cols[i] = node.(*ColumnName)
	}
	return v.Leave(n)
}
484178
func (c *Client) StartNode(nodeID string) error {
	return c.Post(fmt.Sprintf("/nodes/%s/start", nodeID), nil, nil)
}
832219
func (pc *paramMarkerInPrepareChecker) Enter(in ast.Node) (out ast.Node, skipChildren bool) {
	switch v := in.(type) {
	case *driver.ParamMarkerExpr:
		pc.inPrepareStmt = !v.InExecute
		return v, true
	}
	return in, false
}
82496
func pushNode(list []*node, n *node, max int) ([]*node, *node) {
	if len(list) < max {
		list = append(list, nil)
	}
	removed := list[len(list)-1]
	copy(list[1:], list)
	list[0] = n
	return list, removed
}
202075
func (s *Server) CreateNode(w http.ResponseWriter, req *http.Request) {
	config := &adapters.NodeConfig{}

	err := json.NewDecoder(req.Body).Decode(config)
	if err != nil && err != io.EOF {
		http.Error(w, err.Error(), http.StatusBadRequest)
		return
	}

	node, err := s.network.NewNodeWithConfig(config)
	if err != nil {
		http.Error(w, err.Error(), http.StatusInternalServerError)
		return
	}

	s.JSON(w, http.StatusCreated, node.NodeInfo())
}
735993
func Enter(fn func(res *Response) error) handler {
	return &Handler{Method: ENTER, Run: fn}
}
1039000
func (d *GoDumper) LeaveNode(n walker.Walkable) {
	d.depth--
	printIndent(d.Writer, d.depth)
	if d.depth != 0 {
		io.WriteString(d.Writer, "},\n")
	} else {
		io.WriteString(d.Writer, "}\n")
	}
}
259429
func (s *Session) Node(node string, q *QueryOptions) ([]*SessionEntry, *QueryMeta, error) {
	var entries []*SessionEntry
	qm, err := s.c.query("/v1/session/node/"+node, &entries, q)
	if err != nil {
		return nil, nil, err
	}
	return entries, qm, nil
}
383648
func (nsr *NamespaceResolver) LeaveNode(w walker.Walkable) {
	switch n := w.(type) {
	case *stmt.Namespace:
		if n.Stmts != nil {
			nsr.Namespace = NewNamespace("")
		}
	}
}
335468
func (d *PrettyJsonDumper) LeaveNode(n walker.Walkable) {
	d.depth--
	fmt.Fprint(d.Writer, "\n")
	d.printIndent(d.Writer)
	fmt.Fprint(d.Writer, "}")
}
721603
func (m *NodeManager) AddRootNode(n *Node) error {
	m.mu.Lock()
	defer m.mu.Unlock()

	if _, ok := m.roots[n.PathName]; ok {
		return fmt.Errorf("toplevel node %v (with name %v) already exists", n.Path, n.Name)
	}
	n.Path = "/" + n.PathName
	n.nodeManager = m

	savedNode := NewNode()
	m.roots[n.PathName] = savedNode
	return m.updateNodeAndBroadcastLocked(n, true /* updateChildren */)
}
1175845
func (a *AggregateFuncExtractor) Enter(n ast.Node) (ast.Node, bool) {
	switch n.(type) {
	case *ast.AggregateFuncExpr:
		a.inAggregateFuncExpr = true
	case *ast.SelectStmt, *ast.UnionStmt:
		return n, true
	}
	return n, false
}
1210587
func (s *Simulation) StartNode(id enode.ID) (err error) {
	return s.Net.Start(id)
}