- Sort Score
- Result 10 results
- Languages All
Results 91 - 100 of 124 for parseRule (0.13 sec)
-
src/cmd/go/script_test.go
defer removeAll(workdir) } s, err := script.NewState(tbContext(ctx, t), workdir, env) if err != nil { t.Fatal(err) } // Unpack archive. a, err := txtar.ParseFile(file) if err != nil { t.Fatal(err) } telemetryDir := initScriptDirs(t, s) if err := s.ExtractFiles(a); err != nil { t.Fatal(err) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 12.2K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/mod/modfile/read.go
err = in.parseErrors } }() // Prime the lexer by reading in the first token. It will be available // in the next peek() or lex() call. in.readToken() // Invoke the parser. in.parseFile() if len(in.parseErrors) > 0 { return nil, in.parseErrors } in.file.Name = in.filename // Assign comments to nearby syntax. in.assignComments() return in.file, nil }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/passes/cgocall/cgocall.go
for _, raw := range files { // If f is a cgo-generated file, Position reports // the original file, honoring //line directives. filename := fset.Position(raw.Pos()).Filename f, err := parser.ParseFile(fset, filename, nil, parser.SkipObjectResolution) if err != nil { return nil, nil, fmt.Errorf("can't parse raw cgo file: %v", err) } found := false for _, spec := range f.Imports {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 23:33:33 UTC 2023 - 11.2K bytes - Viewed (0) -
src/cmd/go/proxy_test.go
return nil, err } prefix := strings.ReplaceAll(enc, "/", "_") name := filepath.Join(cmdGoDir, "testdata/mod", prefix+"_"+encVers+".txt") a := archiveCache.Do(name, func() *txtar.Archive { a, err := txtar.ParseFile(name) if err != nil { if testing.Verbose() || !os.IsNotExist(err) { fmt.Fprintf(os.Stderr, "go proxy: %v\n", err) } a = nil } return a }) if a == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 03 09:56:24 UTC 2023 - 12K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go
} ) func run(fset *token.FileSet, cfg *Config, analyzers []*analysis.Analyzer) ([]result, error) { // Load, parse, typecheck. var files []*ast.File for _, name := range cfg.GoFiles { f, err := parser.ParseFile(fset, name, nil, parser.ParseComments) if err != nil { if cfg.SucceedOnTypecheckFailure { // Silently succeed; let the compiler // report parse errors. err = nil } return nil, err
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 13K bytes - Viewed (0) -
src/cmd/go/internal/modindex/build_read.go
} 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 for _, decl := range info.parsed.Decls {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 23 10:10:21 UTC 2023 - 13K bytes - Viewed (0) -
cni/pkg/plugin/plugin_test.go
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Tue May 21 18:32:01 UTC 2024 - 17.5K bytes - Viewed (0) -
src/cmd/cgo/ast.go
import ( "fmt" "go/ast" "go/format" "go/parser" "go/scanner" "go/token" "os" "strings" ) func parse(name string, src []byte, flags parser.Mode) *ast.File { ast1, err := parser.ParseFile(fset, name, src, flags) if err != nil { if list, ok := err.(scanner.ErrorList); ok { // If err is a scanner.ErrorList, its String will print just // the first error and then (+n more errors).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 07 16:54:27 UTC 2023 - 14.3K bytes - Viewed (0) -
src/go/types/check_test.go
func parseFiles(t *testing.T, filenames []string, srcs [][]byte, mode parser.Mode) ([]*ast.File, []error) { var files []*ast.File var errlist []error for i, filename := range filenames { file, err := parser.ParseFile(fset, filename, srcs[i], mode) if file == nil { t.Fatalf("%s: %s", filename, err) } files = append(files, file) if err != nil { if list, _ := err.(scanner.ErrorList); len(list) > 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 14.1K bytes - Viewed (0) -
src/go/build/read.go
} 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 for _, decl := range info.parsed.Decls {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 16:25:21 UTC 2024 - 14.1K bytes - Viewed (0)