Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for CommClause (0.14 sec)

  1. src/cmd/compile/internal/syntax/positions.go

    		// case *SwitchStmt:
    		// case *SelectStmt:
    
    		// helper nodes
    		case *RangeClause:
    			if n.Lhs != nil {
    				m = n.Lhs
    				continue
    			}
    			m = n.X
    		// case *CaseClause:
    		// case *CommClause:
    
    		default:
    			return n.Pos()
    		}
    	}
    }
    
    // EndPos returns the approximate end position of n in the source.
    // For some nodes (*Name, *BasicLit) it returns the position immediately
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  2. src/go/types/labels.go

    			}
    
    		case *ast.CaseClause:
    			blockBranches(nil, s.Body)
    
    		case *ast.SwitchStmt:
    			stmtBranches(s.Body)
    
    		case *ast.TypeSwitchStmt:
    			stmtBranches(s.Body)
    
    		case *ast.CommClause:
    			blockBranches(nil, s.Body)
    
    		case *ast.SelectStmt:
    			stmtBranches(s.Body)
    
    		case *ast.ForStmt:
    			stmtBranches(s.Body)
    
    		case *ast.RangeStmt:
    			stmtBranches(s.Body)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. src/go/ast/walk.go

    		}
    		if n.Tag != nil {
    			Walk(v, n.Tag)
    		}
    		Walk(v, n.Body)
    
    	case *TypeSwitchStmt:
    		if n.Init != nil {
    			Walk(v, n.Init)
    		}
    		Walk(v, n.Assign)
    		Walk(v, n.Body)
    
    	case *CommClause:
    		if n.Comm != nil {
    			Walk(v, n.Comm)
    		}
    		walkList(v, n.Body)
    
    	case *SelectStmt:
    		Walk(v, n.Body)
    
    	case *ForStmt:
    		if n.Init != nil {
    			Walk(v, n.Init)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/parser.go

    	}
    
    	c.Colon = p.pos()
    	p.want(_Colon)
    	c.Body = p.stmtList()
    
    	return c
    }
    
    func (p *parser) commClause() *CommClause {
    	if trace {
    		defer p.trace("commClause")()
    	}
    
    	c := new(CommClause)
    	c.pos = p.pos()
    
    	switch p.tok {
    	case _Case:
    		p.next()
    		c.Comm = p.simpleStmt(nil, 0)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    	var first ast.Stmt
    	for _, s := range list {
    		var d ast.Stmt
    		switch c := s.(type) {
    		case *ast.CaseClause:
    			if len(c.List) == 0 {
    				d = s
    			}
    		case *ast.CommClause:
    			if c.Comm == nil {
    				d = s
    			}
    		default:
    			check.error(s, InvalidSyntaxTree, "case/communication clause expected")
    		}
    		if d != nil {
    			if first != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    				// TODO(gri) probably ok to bail out after first error (and simplify this code)
    			} else {
    				first = c
    			}
    		}
    	}
    }
    
    func (check *Checker) multipleSelectDefaults(list []*syntax.CommClause) {
    	var first *syntax.CommClause
    	for _, c := range list {
    		if c.Comm == nil {
    			if first != nil {
    				check.errorf(c, DuplicateDefault, "multiple defaults (first at %s)", first.Pos())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/cmd/cover/cover.go

    					clause := n.(*ast.CaseClause)
    					f.addCounters(clause.Colon+1, clause.Colon+1, clause.End(), clause.Body, false)
    				}
    				return f
    			case *ast.CommClause: // select
    				for _, n := range n.List {
    					clause := n.(*ast.CommClause)
    					f.addCounters(clause.Colon+1, clause.Colon+1, clause.End(), clause.Body, false)
    				}
    				return f
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  8. src/go/types/api.go

    	//
    	//     *ast.File
    	//     *ast.FuncType
    	//     *ast.TypeSpec
    	//     *ast.BlockStmt
    	//     *ast.IfStmt
    	//     *ast.SwitchStmt
    	//     *ast.TypeSwitchStmt
    	//     *ast.CaseClause
    	//     *ast.CommClause
    	//     *ast.ForStmt
    	//     *ast.RangeStmt
    	//
    	Scopes map[ast.Node]*Scope
    
    	// InitOrder is the list of package-level initializers in the order in which
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/api.go

    	//
    	//     *syntax.File
    	//     *syntax.FuncType
    	//     *syntax.TypeDecl
    	//     *syntax.BlockStmt
    	//     *syntax.IfStmt
    	//     *syntax.SwitchStmt
    	//     *syntax.CaseClause
    	//     *syntax.CommClause
    	//     *syntax.ForStmt
    	//
    	Scopes map[syntax.Node]*Scope
    
    	// InitOrder is the list of package-level initializers in the order in which
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/rangefunc/rewrite.go

    		case *syntax.BlockStmt:
    			for i, s := range n.List {
    				n.List[i] = r.editStmt(s)
    			}
    		case *syntax.CaseClause:
    			for i, s := range n.Body {
    				n.Body[i] = r.editStmt(s)
    			}
    		case *syntax.CommClause:
    			for i, s := range n.Body {
    				n.Body[i] = r.editStmt(s)
    			}
    		case *syntax.LabeledStmt:
    			n.Stmt = r.editStmt(n.Stmt)
    		}
    
    		// Pop n.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
Back to top