- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for parseRule (0.27 sec)
-
src/internal/trace/testtrace/format.go
package testtrace import ( "bytes" "fmt" "internal/trace/raw" "internal/txtar" "io" ) // ParseFile parses a test file generated by the testgen package. func ParseFile(testPath string) (io.Reader, *Expectation, error) { ar, err := txtar.ParseFile(testPath) if err != nil { return nil, nil, fmt.Errorf("failed to read test file for %s: %v", testPath, err) } if len(ar.Files) != 2 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 1.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/lite/schema/flatbuffer_compatibility_test.cc
// Parse the schemas flatbuffers::Parser base_parser, current_parser; std::vector<const char *> include_directories; ASSERT_TRUE(ParseFile(&base_parser, base_filename, base_contents)); ASSERT_TRUE(ParseFile(¤t_parser, current_filename, current_contents)); // Check that the schemas conform and fail if they don't auto err = current_parser.ConformTo(base_parser); if (!err.empty()) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue May 28 14:28:27 UTC 2024 - 3.1K bytes - Viewed (0) -
src/go/ast/example_test.go
src := ` package p const c = 1.0 var X = f(3.14)*2 + c ` // Create the AST by parsing src. fset := token.NewFileSet() // positions are relative to fset f, err := parser.ParseFile(fset, "src.go", src, 0) if err != nil { panic(err) } // Inspect the AST and print all identifiers and literals. ast.Inspect(f, func(n ast.Node) bool { var s string switch x := n.(type) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 21:44:50 UTC 2024 - 6.1K bytes - Viewed (0) -
src/cmd/fix/main.go
return err } file, err := parser.ParseFile(fset, filename, src, parserMode) if err != nil { return err } // Make sure file is in canonical format. // This "fmt" pseudo-fix cannot be disabled. newSrc, err := gofmtFile(file) if err != nil { return err } if !bytes.Equal(newSrc, src) { newFile, err := parser.ParseFile(fset, filename, newSrc, parserMode) if err != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 5.4K bytes - Viewed (0) -
src/go/ast/walk_test.go
// bug, this test failed with a runtime panic. src := "package p\ntype T struct {\n\tF int `json:\"f\"` // a field\n}\n" fset := token.NewFileSet() f, err := parser.ParseFile(fset, "", src, 0) if err != nil { panic(err) } for n := range ast.Preorder(f) { if id, ok := n.(*ast.Ident); ok && id.Name == "F" { break } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 916 bytes - Viewed (0) -
src/internal/dag/parse.go
less []string op string // Either "<" or "!<" def []string } type syntaxError string func (e syntaxError) Error() string { return string(e) } // parseRules parses the rules of a DAG. func parseRules(rules string) (out []rule, err error) { defer func() { e := recover() switch e := e.(type) { case nil: return case syntaxError: err = e default: panic(e)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.7K bytes - Viewed (0) -
src/internal/trace/reader_test.go
testName, err := filepath.Rel("./testdata", testPath) if err != nil { t.Fatalf("failed to relativize testdata path: %v", err) } t.Run(testName, func(t *testing.T) { tr, exp, err := testtrace.ParseFile(testPath) if err != nil { t.Fatalf("failed to parse test file at %s: %v", testPath, err) } testReader(t, tr, exp) }) } } func FuzzReader(f *testing.F) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 3.7K bytes - Viewed (0) -
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) -
src/internal/trace/gc_test.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 5.3K bytes - Viewed (0) -
src/runtime/traceback_system_test.go
// Cause the crash report to be written to stdout. panic("oops") } // TestTracebackSystem tests that the syntax of crash reports produced // by GOTRACEBACK=system (see traceback2) contains a complete, // parseable list of program counters for the running goroutine that // can be parsed and fed to runtime.CallersFrames to obtain accurate // information about the logical call stack, even in the presence of // inlining. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 15:19:04 UTC 2024 - 7.4K bytes - Viewed (0)