- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for initParserMode (0.28 sec)
-
src/cmd/gofmt/gofmt_unix_test.go
if err := os.Chtimes(fn, past, past); err != nil { t.Fatal(err) } info, err := os.Stat(fn) if err != nil { t.Fatal(err) } defer func() { *write = false }() *write = true initParserMode() initRewrite() const maxWeight = 2 << 20 var buf, errBuf strings.Builder s := newSequencer(maxWeight, &buf, &errBuf) s.Add(fileWeight(fn, info), func(r *reporter) error {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 18 12:52:14 UTC 2023 - 1.4K bytes - Viewed (0) -
src/go/types/gotype.go
panicOnError = flag.Bool("panic", false, "panic on first error") ) var ( fset = token.NewFileSet() errorCount = 0 sequential = false parserMode parser.Mode ) func initParserMode() { if *allErrors { parserMode |= parser.AllErrors } if *printAST { sequential = true } if *printTrace { parserMode |= parser.Trace sequential = true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 8.3K bytes - Viewed (0) -
src/cmd/gofmt/gofmt_test.go
case "-s": *simplifyAST = true case "-stdin": // fake flag - pretend input is from stdin info = nil default: t.Errorf("unrecognized flag name: %s", name) } } initParserMode() initRewrite() const maxWeight = 2 << 20 var buf, errBuf bytes.Buffer s := newSequencer(maxWeight, &buf, &errBuf) s.Add(fileWeight(in, info), func(r *reporter) error { return processFile(in, info, nil, r)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 10 19:22:49 UTC 2022 - 4.3K bytes - Viewed (0) -
src/cmd/gofmt/gofmt.go
var ( rewrite func(*token.FileSet, *ast.File) *ast.File parserMode parser.Mode ) func usage() { fmt.Fprintf(os.Stderr, "usage: gofmt [flags] [path ...]\n") flag.PrintDefaults() } func initParserMode() { parserMode = parser.ParseComments if *allErrors { parserMode |= parser.AllErrors } // It's only -r that makes use of go/ast's object resolution, // so avoid the unnecessary work if the flag isn't used.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 15.1K bytes - Viewed (0)