Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 42 for parseRule (0.33 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. cni/pkg/plugin/plugin_test.go

    			want: []string{"1234", "2345"},
    		},
    		{
    			name: "Empty",
    			args: args{ports: []string{}},
    			want: []string{},
    		},
    		{
    			name: "Non-parseable",
    			args: args{ports: []string{"abcd", "2345", "abcd"}},
    			want: []string{"abcd", "2345"},
    		},
    	}
    	for _, tt := range tests {
    		t.Run(tt.name, func(t *testing.T) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue May 21 18:32:01 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. 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)
  10. istioctl/pkg/analyze/analyze.go

    	analysisCmd.PersistentFlags().BoolVar(&ignoreUnknown, "ignore-unknown", false,
    		"Don't complain about un-parseable input documents, for cases where analyze should run only on k8s compliant inputs.")
    	analysisCmd.PersistentFlags().StringVarP(&revisionSpecified, "revision", "", "default",
    		"analyze a specific revision deployed.")
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Apr 02 08:32:06 UTC 2024
    - 17K bytes
    - Viewed (0)
Back to top