Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 24 for IfNode (0.23 sec)

  1. pkg/test/framework/components/echo/config/param/template.go

    		// That's all we need when looking for well-known params.
    		firstIdentifier := n.(*parse.FieldNode).Ident[0]
    		out.Insert(firstIdentifier)
    	case parse.NodeIf:
    		out.Merge(getParams(n.(*parse.IfNode).Pipe))
    	case parse.NodeWith:
    		out.Merge(getParams(n.(*parse.WithNode).Pipe))
    	case parse.NodeRange:
    		out.Merge(getParams(n.(*parse.RangeNode).Pipe))
    	case parse.NodeAction:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Sep 15 21:32:48 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  2. src/text/template/parse/node.go

    		panic("unknown branch type")
    	}
    }
    
    // IfNode represents an {{if}} action and its commands.
    type IfNode struct {
    	BranchNode
    }
    
    func (t *Tree) newIf(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *IfNode {
    	return &IfNode{BranchNode{tr: t, NodeType: NodeIf, Pos: pos, Line: line, Pipe: pipe, List: list, ElseList: elseList}}
    }
    
    func (i *IfNode) Copy() Node {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  3. src/text/template/parse/parse.go

    func IsEmptyTree(n Node) bool {
    	switch n := n.(type) {
    	case nil:
    		return true
    	case *ActionNode:
    	case *CommentNode:
    		return true
    	case *IfNode:
    	case *ListNode:
    		for _, node := range n.Nodes {
    			if !IsEmptyTree(node) {
    				return false
    			}
    		}
    		return true
    	case *RangeNode:
    	case *TemplateNode:
    	case *TextNode:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 26 20:57:51 UTC 2024
    - 21.3K bytes
    - Viewed (0)
  4. src/html/template/escape.go

    	case *parse.CommentNode:
    		return c
    	case *parse.ContinueNode:
    		c.n = n
    		e.rangeContext.continues = append(e.rangeContext.breaks, c)
    		return context{state: stateDead}
    	case *parse.IfNode:
    		return e.escapeBranch(c, &n.BranchNode, "if")
    	case *parse.ListNode:
    		return e.escapeList(c, n)
    	case *parse.RangeNode:
    		return e.escapeBranch(c, &n.BranchNode, "range")
    	case *parse.TemplateNode:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 02 15:18:39 UTC 2023
    - 32.4K bytes
    - Viewed (0)
  5. src/text/template/exec.go

    		if len(node.Pipe.Decl) == 0 {
    			s.printValue(node, val)
    		}
    	case *parse.BreakNode:
    		panic(walkBreak)
    	case *parse.CommentNode:
    	case *parse.ContinueNode:
    		panic(walkContinue)
    	case *parse.IfNode:
    		s.walkIfOrWith(parse.NodeIf, dot, node.Pipe, node.List, node.ElseList)
    	case *parse.ListNode:
    		for _, node := range node.Nodes {
    			s.walk(dot, node)
    		}
    	case *parse.RangeNode:
    		s.walkRange(dot, node)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 21:22:24 UTC 2024
    - 32K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go

    		{"(*IdentifierNode).Copy", Method, 0},
    		{"(*IdentifierNode).SetPos", Method, 1},
    		{"(*IdentifierNode).SetTree", Method, 4},
    		{"(*IdentifierNode).String", Method, 0},
    		{"(*IfNode).Copy", Method, 0},
    		{"(*IfNode).String", Method, 0},
    		{"(*ListNode).Copy", Method, 0},
    		{"(*ListNode).CopyList", Method, 0},
    		{"(*ListNode).String", Method, 0},
    		{"(*NilNode).Copy", Method, 1},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 534.2K bytes
    - Viewed (0)
  7. src/internal/syscall/unix/siginfo_linux_test.go

    	if v := unsafe.Sizeof(si); v != 128 {
    		t.Fatalf("sizeof: got %d, want 128", v)
    	}
    
    	ofSigno := 0
    	ofErrno := 4
    	ofCode := 8
    	if strings.HasPrefix(runtime.GOARCH, "mips") {
    		// These two fields are swapped on MIPS platforms.
    		ofErrno, ofCode = ofCode, ofErrno
    	}
    	ofPid := 12
    	if host64bit {
    		ofPid = 16
    	}
    	ofUid := ofPid + 4
    	ofStatus := ofPid + 8
    
    	offsets := []struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  8. src/runtime/lfstack.go

    func lfnodeValidate(node *lfnode) {
    	if base, _, _ := findObject(uintptr(unsafe.Pointer(node)), 0, 0); base != 0 {
    		throw("lfstack node allocated from the heap")
    	}
    	if lfstackUnpack(lfstackPack(node, ^uintptr(0))) != node {
    		printlock()
    		println("runtime: bad lfnode address", hex(uintptr(unsafe.Pointer(node))))
    		throw("bad lfnode address")
    	}
    }
    
    func lfstackPack(node *lfnode, cnt uintptr) uint64 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 2K bytes
    - Viewed (0)
  9. src/runtime/lfstack_test.go

    	return (*LFNode)(unsafe.Pointer(node))
    }
    
    func toMyNode(node *LFNode) *MyNode {
    	return (*MyNode)(unsafe.Pointer(node))
    }
    
    var global any
    
    func TestLFStack(t *testing.T) {
    	stack := new(uint64)
    	global = stack // force heap allocation
    
    	// Check the stack is initially empty.
    	if LFStackPop(stack) != nil {
    		t.Fatalf("stack is not empty")
    	}
    
    	// Push one element.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 17 23:12:04 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  10. src/encoding/xml/typeinfo.go

    		valid := true
    		switch mode := finfo.flags & fMode; mode {
    		case 0:
    			finfo.flags |= fElement
    		case fAttr, fCDATA, fCharData, fInnerXML, fComment, fAny, fAny | fAttr:
    			if f.Name == xmlName || tag != "" && mode != fAttr {
    				valid = false
    			}
    		default:
    			// This will also catch multiple modes in a single field.
    			valid = false
    		}
    		if finfo.flags&fMode == fAny {
    			finfo.flags |= fElement
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 07 00:23:29 UTC 2023
    - 9.6K bytes
    - Viewed (0)
Back to top