Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for SendStmt (0.17 sec)

  1. src/go/ast/ast.go

    		Stmt  Stmt
    	}
    
    	// An ExprStmt node represents a (stand-alone) expression
    	// in a statement list.
    	//
    	ExprStmt struct {
    		X Expr // expression
    	}
    
    	// A SendStmt node represents a send statement.
    	SendStmt struct {
    		Chan  Expr
    		Arrow token.Pos // position of "<-"
    		Value Expr
    	}
    
    	// An IncDecStmt node represents an increment or decrement statement.
    	IncDecStmt struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    			tok(n.Return, len("return")))
    
    	case *ast.SelectStmt:
    		children = append(children,
    			tok(n.Select, len("select")))
    
    	case *ast.SelectorExpr:
    		// nop
    
    	case *ast.SendStmt:
    		children = append(children,
    			tok(n.Arrow, len("<-")))
    
    	case *ast.SliceExpr:
    		children = append(children,
    			tok(n.Lbrack, len("[")),
    			tok(n.Rbrack, len("]")))
    
    	case *ast.StarExpr:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/stmt.go

    		for i, clause := range s.Body {
    			if clause == nil {
    				continue // error reported before
    			}
    
    			// clause.Comm must be a SendStmt, RecvStmt, or default case
    			valid := false
    			var rhs syntax.Expr // rhs of RecvStmt, or nil
    			switch s := clause.Comm.(type) {
    			case nil, *syntax.SendStmt:
    				valid = true
    			case *syntax.AssignStmt:
    				if _, ok := s.Rhs.(*syntax.ListExpr); !ok {
    					rhs = s.Rhs
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  4. src/go/types/stmt.go

    			clause, _ := s.(*ast.CommClause)
    			if clause == nil {
    				continue // error reported before
    			}
    
    			// clause.Comm must be a SendStmt, RecvStmt, or default case
    			valid := false
    			var rhs ast.Expr // rhs of RecvStmt, or nil
    			switch s := clause.Comm.(type) {
    			case nil, *ast.SendStmt:
    				valid = true
    			case *ast.AssignStmt:
    				if len(s.Rhs) == 1 {
    					rhs = s.Rhs[0]
    				}
    			case *ast.ExprStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/cfg/builder.go

    	// within the body of switch/typeswitch/select/for/range.
    	// It is effectively an additional default-nil parameter of stmt().
    	var label *lblock
    start:
    	switch s := _s.(type) {
    	case *ast.BadStmt,
    		*ast.SendStmt,
    		*ast.IncDecStmt,
    		*ast.GoStmt,
    		*ast.DeferStmt,
    		*ast.EmptyStmt,
    		*ast.AssignStmt:
    		// No effect on control flow.
    		b.add(s)
    
    	case *ast.ExprStmt:
    		b.add(s)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  6. src/cmd/cgo/ast.go

    	case *ast.DeclStmt:
    		f.walk(n.Decl, ctxDecl, visit)
    	case *ast.EmptyStmt:
    	case *ast.LabeledStmt:
    		f.walk(n.Stmt, ctxStmt, visit)
    	case *ast.ExprStmt:
    		f.walk(&n.X, ctxExpr, visit)
    	case *ast.SendStmt:
    		f.walk(&n.Chan, ctxExpr, visit)
    		f.walk(&n.Value, ctxExpr, visit)
    	case *ast.IncDecStmt:
    		f.walk(&n.X, ctxExpr, visit)
    	case *ast.AssignStmt:
    		f.walk(n.Lhs, ctxExpr, visit)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		// nothing to do
    
    	case *ast.LabeledStmt:
    		a.apply(n, "Label", nil, n.Label)
    		a.apply(n, "Stmt", nil, n.Stmt)
    
    	case *ast.ExprStmt:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.SendStmt:
    		a.apply(n, "Chan", nil, n.Chan)
    		a.apply(n, "Value", nil, n.Value)
    
    	case *ast.IncDecStmt:
    		a.apply(n, "X", nil, n.X)
    
    	case *ast.AssignStmt:
    		a.applyList(n, "Lhs")
    		a.applyList(n, "Rhs")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  8. src/cmd/fix/fix.go

    		walkBeforeAfter(&n.Decl, before, after)
    	case *ast.EmptyStmt:
    	case *ast.LabeledStmt:
    		walkBeforeAfter(&n.Stmt, before, after)
    	case *ast.ExprStmt:
    		walkBeforeAfter(&n.X, before, after)
    	case *ast.SendStmt:
    		walkBeforeAfter(&n.Chan, before, after)
    		walkBeforeAfter(&n.Value, before, after)
    	case *ast.IncDecStmt:
    		walkBeforeAfter(&n.X, before, after)
    	case *ast.AssignStmt:
    		walkBeforeAfter(&n.Lhs, before, after)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 14.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/expr.go

    		n := n.(*ir.ConvExpr)
    		return walkStringToRunes(n, init)
    
    	case ir.OARRAYLIT, ir.OSLICELIT, ir.OMAPLIT, ir.OSTRUCTLIT, ir.OPTRLIT:
    		return walkCompLit(n, init)
    
    	case ir.OSEND:
    		n := n.(*ir.SendStmt)
    		return walkSend(n, init)
    
    	case ir.OCLOSURE:
    		return walkClosure(n.(*ir.ClosureExpr), init)
    
    	case ir.OMETHVALUE:
    		return walkMethodValue(n.(*ir.SelectorExpr), init)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/stmt.go

    				oselrecv2(ir.BlankNode, n, false)
    
    			case ir.OSEND:
    				break
    			}
    		}
    
    		Stmts(ncase.Body)
    	}
    
    	base.Pos = lno
    }
    
    // tcSend typechecks an OSEND node.
    func tcSend(n *ir.SendStmt) ir.Node {
    	n.Chan = Expr(n.Chan)
    	n.Value = Expr(n.Value)
    	n.Chan = DefaultLit(n.Chan, nil)
    	t := n.Chan.Type()
    	if t == nil {
    		return n
    	}
    	if !t.IsChan() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
Back to top