Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for LabeledStmt (0.15 sec)

  1. src/go/types/labels.go

    	parent *block                      // enclosing block
    	lstmt  *ast.LabeledStmt            // labeled statement to which this block belongs, or nil
    	labels map[string]*ast.LabeledStmt // allocated lazily
    }
    
    // insert records a new label declaration for the current block.
    // The label must not have been declared before in any block.
    func (b *block) insert(s *ast.LabeledStmt) {
    	name := s.Label.Name
    	if debug {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/labels.go

    	parent *block                         // enclosing block
    	lstmt  *syntax.LabeledStmt            // labeled statement to which this block belongs, or nil
    	labels map[string]*syntax.LabeledStmt // allocated lazily
    }
    
    // insert records a new label declaration for the current block.
    // The label must not have been declared before in any block.
    func (b *block) insert(s *syntax.LabeledStmt) {
    	name := s.Label.Value
    	if debug {
    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/cmd/compile/internal/syntax/positions.go

    		// case *DotsType:
    		// case *StructType:
    		// case *Field:
    		// case *InterfaceType:
    		// case *FuncType:
    		// case *MapType:
    		// case *ChanType:
    
    		// statements
    		// case *EmptyStmt:
    		// case *LabeledStmt:
    		// case *BlockStmt:
    		// case *ExprStmt:
    		case *SendStmt:
    			m = n.Chan
    		// case *DeclStmt:
    		case *AssignStmt:
    			m = n.Lhs
    		// case *BranchStmt:
    		// case *CallStmt:
    		// case *ReturnStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  4. src/go/ast/walk.go

    	case *ChanType:
    		Walk(v, n.Value)
    
    	// Statements
    	case *BadStmt:
    		// nothing to do
    
    	case *DeclStmt:
    		Walk(v, n.Decl)
    
    	case *EmptyStmt:
    		// nothing to do
    
    	case *LabeledStmt:
    		Walk(v, n.Label)
    		Walk(v, n.Stmt)
    
    	case *ExprStmt:
    		Walk(v, n.X)
    
    	case *SendStmt:
    		Walk(v, n.Chan)
    		Walk(v, n.Value)
    
    	case *IncDecStmt:
    		Walk(v, n.X)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  5. src/cmd/cover/cover.go

    				// The result will then be
    				//	foo: COUNTER[n]++; stmt
    				// However, we can't do this if the labeled statement is already
    				// a control statement, such as a labeled for.
    				if label, isLabel := stmt.(*ast.LabeledStmt); isLabel && !f.isControl(label.Stmt) {
    					newLabel := *label
    					newLabel.Stmt = &ast.EmptyStmt{
    						Semicolon: label.Stmt.Pos(),
    						Implicit:  true,
    					}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/parser.go

    	a.pos = pos
    	a.Op = op
    	a.Lhs = lhs
    	a.Rhs = rhs
    	return a
    }
    
    func (p *parser) labeledStmtOrNil(label *Name) Stmt {
    	if trace {
    		defer p.trace("labeledStmt")()
    	}
    
    	s := new(LabeledStmt)
    	s.pos = p.pos()
    	s.Label = label
    
    	p.want(_Colon)
    
    	if p.tok == _Rbrace {
    		// We expect a statement (incl. an empty statement), which must be
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 62.9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/rangefunc/rewrite.go

    		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.
    		if len(r.forStack) > 0 && r.stack[len(r.stack)-1] == r.forStack[len(r.forStack)-1].nfor {
    			r.endLoop(r.forStack[len(r.forStack)-1])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  8. src/go/types/stmt.go

    	inner := ctxt &^ (fallthroughOk | finalSwitchCase | inTypeSwitch)
    
    	switch s := s.(type) {
    	case *ast.BadStmt, *ast.EmptyStmt:
    		// ignore
    
    	case *ast.DeclStmt:
    		check.declStmt(s.Decl)
    
    	case *ast.LabeledStmt:
    		check.hasLabel = true
    		check.stmt(ctxt, s.Stmt)
    
    	case *ast.ExprStmt:
    		// spec: "With the exception of specific built-in functions,
    		// function and method calls and receive operations can appear
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/stmt.go

    	inner := ctxt &^ (fallthroughOk | finalSwitchCase | inTypeSwitch)
    
    	switch s := s.(type) {
    	case *syntax.EmptyStmt:
    		// ignore
    
    	case *syntax.DeclStmt:
    		check.declStmt(s.DeclList)
    
    	case *syntax.LabeledStmt:
    		check.hasLabel = true
    		check.stmt(ctxt, s.Stmt)
    
    	case *syntax.ExprStmt:
    		// spec: "With the exception of specific built-in functions,
    		// function and method calls and receive operations can appear
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  10. doc/go1.17_spec.html

    is performed before adding <code>x</code>.
    </p>
    
    <h2 id="Statements">Statements</h2>
    
    <p>
    Statements control execution.
    </p>
    
    <pre class="ebnf">
    Statement =
    	Declaration | LabeledStmt | SimpleStmt |
    	GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt |
    	FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt |
    	DeferStmt .
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
Back to top