Search Options

Results per page
Sort
Preferred Languages
Advance

Results 121 - 130 of 274 for Fset (0.06 sec)

  1. src/go/build/deps_test.go

    			continue
    		}
    		if !strings.HasSuffix(name, ".go") || strings.HasSuffix(name, "_test.go") {
    			continue
    		}
    		info := fileInfo{
    			name: filepath.Join(dir, name),
    			fset: fset,
    		}
    		f, err := os.Open(info.name)
    		if err != nil {
    			return nil, err
    		}
    		err = readGoInfo(f, &info)
    		f.Close()
    		if err != nil {
    			return nil, fmt.Errorf("reading %v: %v", name, err)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 24 16:41:13 UTC 2024
    - 19.2K bytes
    - Viewed (0)
  2. src/go/types/labels.go

    		if t := s.lstmt; t != nil && t.Label.Name == name {
    			return t
    		}
    	}
    	return nil
    }
    
    // blockBranches processes a block's statement list and returns the set of outgoing forward jumps.
    // all is the scope of all declared labels, parent the set of labels declared in the immediately
    // enclosing block, and lstmt is the labeled statement this block is associated with (or nil).
    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/types/generate_test.go

    	dstDir = "/src/go/types/"
    )
    
    // TestGenerate verifies that generated files in go/types match their types2
    // counterpart. If -write is set, this test actually writes the expected
    // content to go/types; otherwise, it just compares with the existing content.
    func TestGenerate(t *testing.T) {
    	// If filesToWrite is set, write the generated content to disk.
    	// In the special case of "all", write all files in filemap.
    	write := *filesToWrite != ""
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  4. src/go/build/build.go

    		// skip
    		return nil, nil
    	}
    
    	if !ctxt.goodOSArchFile(name, allTags) && !ctxt.UseAllFiles {
    		return nil, nil
    	}
    
    	info := &fileInfo{name: ctxt.joinPath(dir, name), fset: fset}
    	if ext == ".syso" {
    		// binary, no reading
    		return info, nil
    	}
    
    	f, err := ctxt.openFile(info.name)
    	if err != nil {
    		return nil, err
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 62.3K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/ctrlflow/ctrlflow.go

    			}
    		}
    		if di.noReturn {
    			c.pass.ExportObjectFact(fn, new(noReturn))
    		}
    
    		// debugging
    		if false {
    			log.Printf("CFG for %s:\n%s (noreturn=%t)\n", fn, di.cfg.Format(c.pass.Fset), di.noReturn)
    		}
    	}
    }
    
    // callMayReturn reports whether the called function may return.
    // It is passed to the CFG builder.
    func (c *CFGs) callMayReturn(call *ast.CallExpr) (r bool) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 09 01:28:01 UTC 2023
    - 6.6K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/buildtag/buildtag.go

    		if err := checkOtherFile(pass, name); err != nil {
    			return nil, err
    		}
    	}
    	for _, name := range pass.IgnoredFiles {
    		if strings.HasSuffix(name, ".go") {
    			f, err := parser.ParseFile(pass.Fset, name, nil, parser.ParseComments|parser.SkipObjectResolution)
    			if err != nil {
    				// Not valid Go source code - not our job to diagnose, so ignore.
    				return nil, nil
    			}
    			checkGoFile(pass, f)
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  7. src/cmd/doc/pkg.go

    				return true
    			}
    		}
    		for _, name := range pkg.CgoFiles {
    			if name == info.Name() {
    				return true
    			}
    		}
    		return false
    	}
    	fset := token.NewFileSet()
    	pkgs, err := parser.ParseDir(fset, pkg.Dir, include, parser.ParseComments)
    	if err != nil {
    		log.Fatal(err)
    	}
    	// Make sure they are all in one package.
    	if len(pkgs) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 08 20:15:52 UTC 2024
    - 32K bytes
    - Viewed (0)
  8. src/go/token/position.go

    //
    // To create the Pos value for a specific source offset (measured in bytes),
    // first add the respective file to the current file set using [FileSet.AddFile]
    // and then call [File.Pos](offset) for that file. Given a Pos value p
    // for a specific file set fset, the corresponding [Position] value is
    // obtained by calling fset.Position(p).
    //
    // Pos values can be compared directly with the usual comparison operators:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/_gen/rulegen.go

    		fn.add(sw)
    	}
    	fn.add(stmtf("return false"))
    	genFile.add(fn)
    
    	// Remove unused imports and variables.
    	buf := new(bytes.Buffer)
    	fprint(buf, genFile)
    	fset := token.NewFileSet()
    	file, err := parser.ParseFile(fset, "", buf, parser.ParseComments)
    	if err != nil {
    		filename := fmt.Sprintf("%s_broken.go", arch.name)
    		if err := os.WriteFile(filename, buf.Bytes(), 0644); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 02 22:09:21 UTC 2023
    - 48.7K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    	types.Typ[types.Uint64],
    	types.NewSlice(types.Universe.Lookup("byte").Type()),
    }
    
    func run(pass *analysis.Pass) (interface{}, error) {
    	for _, f := range pass.Files {
    		if !strings.HasSuffix(pass.Fset.File(f.Pos()).Name(), "_test.go") {
    			continue
    		}
    		for _, decl := range f.Decls {
    			fn, ok := decl.(*ast.FuncDecl)
    			if !ok || fn.Recv != nil {
    				// Ignore non-functions or functions with receivers.
    				continue
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
Back to top