Search Options

Results per page
Sort
Preferred Languages
Advance

Results 91 - 100 of 274 for Fset (0.04 sec)

  1. src/cmd/go/internal/modindex/scan.go

    // representation. A nil error is converted to an empty string, and all other
    // errors are converted to a JSON-marshaled parseError struct, with ErrorList
    // set for errors of type scanner.ErrorList, and ErrorString set to the error's
    // string representation for all other errors.
    func parseErrorToString(err error) string {
    	if err == nil {
    		return ""
    	}
    	var p parseError
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  2. src/go/build/read.go

    		for r.err == nil && !r.eof {
    			r.readByte()
    		}
    		info.header = r.buf
    	}
    	if r.err != nil {
    		return r.err
    	}
    
    	if info.fset == nil {
    		return nil
    	}
    
    	// Parse file header & record imports.
    	info.parsed, info.parseErr = parser.ParseFile(info.fset, info.name, info.header, parser.ImportsOnly|parser.ParseComments)
    	if info.parseErr != nil {
    		return nil
    	}
    
    	hasEmbed := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. src/go/printer/printer.go

    // Position information is interpreted relative to the file set fset.
    // The node type must be *[ast.File], *[CommentedNode], [][ast.Decl], [][ast.Stmt],
    // or assignment-compatible to [ast.Expr], [ast.Decl], [ast.Spec], or [ast.Stmt].
    func (cfg *Config) Fprint(output io.Writer, fset *token.FileSet, node any) error {
    	return cfg.fprint(output, fset, node, make(map[ast.Node]int))
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/directive/directive.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)
    			if err != nil {
    				// Not valid Go source code - not our job to diagnose, so ignore.
    				continue
    			}
    			checkGoFile(pass, f)
    		} else {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/test/ssa_test.go

    			continue
    		}
    		text, err := os.ReadFile(filepath.Join("testdata", f.Name()))
    		if err != nil {
    			t.Fatalf("can't read testdata/%s: %v", f.Name(), err)
    		}
    		fset := token.NewFileSet()
    		code, err := parser.ParseFile(fset, f.Name(), text, 0)
    		if err != nil {
    			t.Fatalf("can't parse testdata/%s: %v", f.Name(), err)
    		}
    		srcs = append(srcs, filepath.Join("testdata", f.Name()))
    		foundTest := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 05 23:35:29 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  6. src/go/types/errors.go

    		msg = "\t" + msg
    	}
    
    	span := spanOf(posn)
    	e := Error{
    		Fset:       check.fset,
    		Pos:        span.pos,
    		Msg:        stripAnnotations(msg),
    		Soft:       soft,
    		go116code:  code,
    		go116start: span.start,
    		go116end:   span.end,
    	}
    
    	if check.errpos != nil {
    		// If we have an internal error and the errpos override is set, use it to
    		// augment our error positioning.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/mkbuiltin.go

    		_, err = os.Stdout.Write(out)
    	} else {
    		err = os.WriteFile("builtin.go", out, 0666)
    	}
    	if err != nil {
    		log.Fatal(err)
    	}
    }
    
    func mkbuiltin(w io.Writer, name string) {
    	fset := token.NewFileSet()
    	f, err := parser.ParseFile(fset, filepath.Join("_builtin", name+".go"), nil, 0)
    	if err != nil {
    		log.Fatal(err)
    	}
    
    	var interner typeInterner
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:56:49 UTC 2023
    - 6K bytes
    - Viewed (0)
  8. src/cmd/go/internal/modindex/build_read.go

    		for r.err == nil && !r.eof {
    			r.readByte()
    		}
    		info.header = r.buf
    	}
    	if r.err != nil {
    		return r.err
    	}
    
    	if info.fset == nil {
    		return nil
    	}
    
    	// Parse file header & record imports.
    	info.parsed, info.parseErr = parser.ParseFile(info.fset, info.name, info.header, parser.ImportsOnly|parser.ParseComments)
    	if info.parseErr != nil {
    		return nil
    	}
    
    	hasEmbed := false
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 10:10:21 UTC 2023
    - 13K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/printf/printf.go

    		return false
    	}
    	if v.typ&argString != 0 && v.verb != 'T' && !bytes.Contains(state.flags, []byte{'#'}) {
    		if methodName, ok := recursiveStringer(pass, arg); ok {
    			pass.ReportRangef(call, "%s format %s with arg %s causes recursive %s method call", state.name, state.format, analysisutil.Format(pass.Fset, arg), methodName)
    			return false
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/atomic/atomic.go

    	if len(call.Args) != 2 {
    		return
    	}
    	arg := call.Args[0]
    	broken := false
    
    	gofmt := func(e ast.Expr) string { return analysisutil.Format(pass.Fset, e) }
    
    	if uarg, ok := arg.(*ast.UnaryExpr); ok && uarg.Op == token.AND {
    		broken = gofmt(left) == gofmt(uarg.X)
    	} else if star, ok := left.(*ast.StarExpr); ok {
    		broken = gofmt(star.X) == gofmt(arg)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:33 UTC 2023
    - 2.3K bytes
    - Viewed (0)
Back to top