Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 30 for LabeledStmt (0.14 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/types2/return.go

    	switch s := s.(type) {
    	default:
    		panic("unreachable")
    
    	case *syntax.DeclStmt, *syntax.EmptyStmt, *syntax.SendStmt,
    		*syntax.AssignStmt, *syntax.CallStmt:
    		// no chance
    
    	case *syntax.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Value)
    
    	case *syntax.ExprStmt:
    		// calling the predeclared (possibly parenthesized) panic() function is terminating
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. src/go/types/return.go

    	default:
    		panic("unreachable")
    
    	case *ast.BadStmt, *ast.DeclStmt, *ast.EmptyStmt, *ast.SendStmt,
    		*ast.IncDecStmt, *ast.AssignStmt, *ast.GoStmt, *ast.DeferStmt,
    		*ast.RangeStmt:
    		// no chance
    
    	case *ast.LabeledStmt:
    		return check.isTerminating(s.Stmt, s.Label.Name)
    
    	case *ast.ExprStmt:
    		// calling the predeclared (possibly parenthesized) panic() function is terminating
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  5. src/go/ast/scope.go

    // the [types.Info] struct for details.
    type Object struct {
    	Kind ObjKind
    	Name string // declared name
    	Decl any    // corresponding Field, XxxSpec, FuncDecl, LabeledStmt, AssignStmt, Scope; or nil
    	Data any    // object-specific data; or nil
    	Type any    // placeholder for type information; may be nil
    }
    
    // NewObj creates a new object of a given kind and name.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 28 21:32:41 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/syntax/nodes_test.go

    	{"Field", `@x T`},
    	{"Field", `@x *(T)`},
    	{"Field", `@x, y, z T`},
    	{"Field", `@x, y, z (*T)`},
    }
    
    var stmts = []test{
    	{"EmptyStmt", `@`},
    
    	{"LabeledStmt", `L@:`},
    	{"LabeledStmt", `L@: ;`},
    	{"LabeledStmt", `L@: f()`},
    
    	{"BlockStmt", `@{}`},
    
    	// The position of an ExprStmt is the position of the expression.
    	{"ExprStmt", `@<-ch`},
    	{"ExprStmt", `f@()`},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 18:45:06 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  7. 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)
  8. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/loopclosure/loopclosure.go

    // unlabel returns the inner statement for the possibly labeled statement stmt,
    // stripping any (possibly nested) *ast.LabeledStmt wrapper.
    //
    // The second result reports whether stmt was an *ast.LabeledStmt.
    func unlabel(stmt ast.Stmt) (ast.Stmt, bool) {
    	labeled := false
    	for {
    		labelStmt, ok := stmt.(*ast.LabeledStmt)
    		if !ok {
    			return stmt, labeled
    		}
    		labeled = true
    		stmt = labelStmt.Stmt
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  9. 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)
  10. 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)
Back to top