Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 36 for LabeledStmt (0.15 sec)

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

    // Statements
    
    type (
    	Stmt interface {
    		Node
    		aStmt()
    	}
    
    	SimpleStmt interface {
    		Stmt
    		aSimpleStmt()
    	}
    
    	EmptyStmt struct {
    		simpleStmt
    	}
    
    	LabeledStmt struct {
    		Label *Name
    		Stmt  Stmt
    		stmt
    	}
    
    	BlockStmt struct {
    		List   []Stmt
    		Rbrace Pos
    		stmt
    	}
    
    	ExprStmt struct {
    		X Expr
    		simpleStmt
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:38 UTC 2023
    - 9K bytes
    - Viewed (0)
  2. src/go/ast/ast.go

    	//
    	EmptyStmt struct {
    		Semicolon token.Pos // position of following ";"
    		Implicit  bool      // if set, ";" was omitted in the source
    	}
    
    	// A LabeledStmt node represents a labeled statement.
    	LabeledStmt struct {
    		Label *Ident
    		Colon token.Pos // position of ":"
    		Stmt  Stmt
    	}
    
    	// An ExprStmt node represents a (stand-alone) expression
    	// in a statement list.
    	//
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 35.6K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/tools/go/ast/inspector/typeof.go

    		return 1 << nIndexExpr
    	case *ast.IndexListExpr:
    		return 1 << nIndexListExpr
    	case *ast.InterfaceType:
    		return 1 << nInterfaceType
    	case *ast.KeyValueExpr:
    		return 1 << nKeyValueExpr
    	case *ast.LabeledStmt:
    		return 1 << nLabeledStmt
    	case *ast.MapType:
    		return 1 << nMapType
    	case *ast.Package:
    		return 1 << nPackage
    	case *ast.ParenExpr:
    		return 1 << nParenExpr
    	case *ast.RangeStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 4.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/cfg/builder.go

    		d := s.Decl.(*ast.GenDecl)
    		if d.Tok == token.VAR {
    			for _, spec := range d.Specs {
    				if spec, ok := spec.(*ast.ValueSpec); ok {
    					b.add(spec)
    				}
    			}
    		}
    
    	case *ast.LabeledStmt:
    		label = b.labeledBlock(s.Label, s)
    		b.jump(label._goto)
    		b.current = label._goto
    		_s = s.Stmt
    		goto start // effectively: tailcall stmt(g, s.Stmt, label)
    
    	case *ast.ReturnStmt:
    		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)
  5. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go

    	case *ast.InterfaceType:
    		children = append(children,
    			tok(n.Interface, len("interface")))
    
    	case *ast.KeyValueExpr:
    		children = append(children,
    			tok(n.Colon, len(":")))
    
    	case *ast.LabeledStmt:
    		children = append(children,
    			tok(n.Colon, len(":")))
    
    	case *ast.MapType:
    		children = append(children,
    			tok(n.Map, len("map")))
    
    	case *ast.ParenExpr:
    		children = append(children,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 15.9K bytes
    - Viewed (0)
  6. 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)
  7. src/cmd/compile/internal/syntax/walk.go

    		w.fieldList(n.ResultList)
    
    	case *MapType:
    		w.node(n.Key)
    		w.node(n.Value)
    
    	case *ChanType:
    		w.node(n.Elem)
    
    	// statements
    	case *EmptyStmt: // nothing to do
    
    	case *LabeledStmt:
    		w.node(n.Label)
    		w.node(n.Stmt)
    
    	case *BlockStmt:
    		w.stmtList(n.List)
    
    	case *ExprStmt:
    		w.node(n.X)
    
    	case *SendStmt:
    		w.node(n.Chan)
    		w.node(n.Value)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:55:04 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  8. 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)
  9. src/go/printer/printer.go

    		if _, ok := n.(*ast.LabeledStmt); ok {
    			p.indent = 1
    		}
    		p.stmt(n, false)
    	case ast.Decl:
    		p.decl(n)
    	case ast.Spec:
    		p.spec(n, 1, false)
    	case []ast.Stmt:
    		// A labeled statement will un-indent to position the label.
    		// Set p.indent to 1 so we don't get indent "underflow".
    		for _, s := range n {
    			if _, ok := s.(*ast.LabeledStmt); ok {
    				p.indent = 1
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  10. src/cmd/cgo/ast.go

    		f.walk(&n.Value, ctxType, visit)
    	case *ast.ChanType:
    		f.walk(&n.Value, ctxType, visit)
    
    	case *ast.BadStmt:
    	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:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
Back to top