Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for IsStmt (0.15 sec)

  1. src/go/types/labels.go

    				}
    			}
    		}
    		return false
    	}
    
    	blockBranches := func(lstmt *ast.LabeledStmt, list []ast.Stmt) {
    		// Unresolved forward jumps inside the nested block
    		// become forward jumps in the current block.
    		fwdJumps = append(fwdJumps, check.blockBranches(all, b, lstmt, list)...)
    	}
    
    	var stmtBranches func(ast.Stmt)
    	stmtBranches = func(s ast.Stmt) {
    		switch s := s.(type) {
    		case *ast.DeclStmt:
    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

    	b := &block{parent, lstmt, nil}
    
    	var (
    		varDeclPos         syntax.Pos
    		fwdJumps, badJumps []*syntax.BranchStmt
    	)
    
    	// All forward jumps jumping over a variable declaration are possibly
    	// invalid (they may still jump out of the block and be ok).
    	// recordVarDecl records them for the given position.
    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/vendor/golang.org/x/mod/modfile/work.go

    			if _, ok := f.Syntax.Stmt[i].(*CommentBlock); !ok {
    				break
    			}
    		}
    	Found:
    		f.Syntax.Stmt = append(append(f.Syntax.Stmt[:i:i], stmt), f.Syntax.Stmt[i:]...)
    	} else {
    		f.Toolchain.Name = name
    		f.Syntax.updateLine(f.Toolchain.Syntax, "toolchain", name)
    	}
    	return nil
    }
    
    // DropGoStmt deletes the go statement from the file.
    func (f *WorkFile) DropGoStmt() {
    	if f.Go != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 18:34:56 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  4. tests/embedded_struct_test.go

    			t.Errorf("should has prefixed column %v", name)
    		}
    	}
    
    	stmt := gorm.Statement{DB: DB}
    	if err := stmt.Parse(&EngadgetPost{}); err != nil {
    		t.Fatalf("failed to parse embedded struct")
    	} else if len(stmt.Schema.PrimaryFields) != 1 {
    		t.Errorf("should have only one primary field with embedded struct, but got %v", len(stmt.Schema.PrimaryFields))
    	}
    
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Wed May 08 04:07:58 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/syntax/positions.go

    		return list[l-1]
    	}
    	return nil
    }
    
    func lastExpr(list []Expr) Expr {
    	if l := len(list); l > 0 {
    		return list[l-1]
    	}
    	return nil
    }
    
    func lastStmt(list []Stmt) Stmt {
    	if l := len(list); l > 0 {
    		return list[l-1]
    	}
    	return nil
    }
    
    func lastField(list []*Field) *Field {
    	if l := len(list); l > 0 {
    		return list[l-1]
    	}
    	return nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 17:49:19 UTC 2024
    - 6.5K bytes
    - Viewed (0)
  6. src/go/ast/example_test.go

    	//     21  .  .  .  .  .  Closing: 3:11
    	//     22  .  .  .  .  }
    	//     23  .  .  .  }
    	//     24  .  .  .  Body: *ast.BlockStmt {
    	//     25  .  .  .  .  Lbrace: 3:13
    	//     26  .  .  .  .  List: []ast.Stmt (len = 1) {
    	//     27  .  .  .  .  .  0: *ast.ExprStmt {
    	//     28  .  .  .  .  .  .  X: *ast.CallExpr {
    	//     29  .  .  .  .  .  .  .  Fun: *ast.Ident {
    	//     30  .  .  .  .  .  .  .  .  NamePos: 4:2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:44:50 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  7. src/go/ast/walk.go

    	// 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)
    
    	case *AssignStmt:
    		walkList(v, n.Lhs)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 16:34:10 UTC 2024
    - 6.4K bytes
    - Viewed (0)
  8. src/go/ast/commentmap.go

    			r.next()
    		}
    
    		// update previous node
    		p = q
    		pend = fset.Position(p.End())
    
    		// update previous node group if we see an "important" node
    		switch q.(type) {
    		case *File, *Field, Decl, Spec, Stmt:
    			stack.push(q)
    		}
    	}
    
    	return cmap
    }
    
    // Update replaces an old node in the comment map with the new node
    // and returns the new node. Comments that were associated with the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
Back to top