Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 123 for Parsing (0.33 sec)

  1. src/cmd/dist/buildtag_test.go

    	{"compiler_bootstrap", false, nil},
    	{"cmd_go_bootstrap", true, nil},
    	{"syntax(error", false, fmt.Errorf("parsing //go:build line: unexpected (")},
    	{"(gc", false, fmt.Errorf("parsing //go:build line: missing )")},
    	{"gc gc", false, fmt.Errorf("parsing //go:build line: unexpected tag")},
    	{"(gc))", false, fmt.Errorf("parsing //go:build line: unexpected )")},
    }
    
    func TestBuildParser(t *testing.T) {
    	for _, tt := range buildParserTests {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 25 00:02:52 UTC 2021
    - 1.2K bytes
    - Viewed (0)
  2. src/cmd/dist/buildtag.go

    }
    
    // val is the value type result of parsing.
    // We don't keep a parse tree, just the value of the expression.
    type val bool
    
    // exprToken describes a single token in the input.
    // Prefix operators define a prefix func that parses the
    // upcoming value. Binary operators define an infix func
    // that combines two values according to the operator.
    // In that case, the parsing loop parses the two values.
    type exprToken struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 28 03:35:04 UTC 2021
    - 3K bytes
    - Viewed (0)
  3. src/cmd/asm/internal/asm/operand_test.go

    func newParser(goarch string) *Parser {
    	architecture, ctxt := setArch(goarch)
    	return NewParser(ctxt, architecture, nil)
    }
    
    // tryParse executes parse func in panicOnError=true context.
    // parse is expected to call any parsing methods that may panic.
    // Returns error gathered from recover; nil if no parse errors occurred.
    //
    // For unexpected panics, calls t.Fatal.
    func tryParse(t *testing.T, parse func()) (err error) {
    	panicOnError = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 18:31:05 UTC 2023
    - 23.9K bytes
    - Viewed (0)
  4. src/cmd/go/internal/base/path.go

    var cwdOnce sync.Once
    
    // UncachedCwd returns the current working directory.
    // Most callers should use Cwd, which caches the result for future use.
    // UncachedCwd is appropriate to call early in program startup before flag parsing,
    // because the -C flag may change the current directory.
    func UncachedCwd() string {
    	wd, err := os.Getwd()
    	if err != nil {
    		Fatalf("cannot determine current directory: %v", err)
    	}
    	return wd
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat May 20 19:17:27 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. src/archive/tar/strconv_test.go

    	for _, v := range vectors {
    		var p parser
    		got := p.parseNumeric([]byte(v.in))
    		ok := (p.err == nil)
    		if ok != v.ok {
    			if v.ok {
    				t.Errorf("parseNumeric(%q): got parsing failure, want success", v.in)
    			} else {
    				t.Errorf("parseNumeric(%q): got parsing success, want failure", v.in)
    			}
    		}
    		if ok && got != v.want {
    			t.Errorf("parseNumeric(%q): got %d, want %d", v.in, got, v.want)
    		}
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 09 05:28:50 UTC 2021
    - 14K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types/goversion.go

    		log.Fatalf("invalid value %q for -lang: %v", base.Flag.Lang, err)
    	}
    
    	if def := currentLang(); base.Flag.Lang != def {
    		defVers, err := parseLang(def)
    		if err != nil {
    			log.Fatalf("internal error parsing default lang %q: %v", def, err)
    		}
    		if langWant.major > defVers.major || (langWant.major == defVers.major && langWant.minor > defVers.minor) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 08 21:36:02 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/testdata/issue43527.go

            _[A B, /* ERROR missing type parameter name */ interface{}, C, interface{}] int
            _[A B, C interface{}, D, /* ERROR missing type parameter name */ interface{}] int
    )
    
    // function type parameters use the same parsing routine - just have a couple of tests
    
    func _[A, B /* ERROR missing type constraint */ ]() {}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 01 17:49:03 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  8. src/archive/tar/strconv.go

    	binBits := uint(n-1) * 8
    	return n >= 9 || (x >= -1<<binBits && x < 1<<binBits)
    }
    
    // parseNumeric parses the input as being encoded in either base-256 or octal.
    // This function may return negative numbers.
    // If parsing fails or an integer overflow occurs, err will be set.
    func (p *parser) parseNumeric(b []byte) int64 {
    	// Check for base-256 (binary) format first.
    	// If the first bit is set, then all following bits constitute a two's
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 01 14:28:42 UTC 2023
    - 9K bytes
    - Viewed (0)
  9. src/cmd/fix/main_test.go

    func parseFixPrint(t *testing.T, fn func(*ast.File) bool, desc, in string, mustBeGofmt bool) (out string, fixed, ok bool) {
    	file, err := parser.ParseFile(fset, desc, in, parserMode)
    	if err != nil {
    		t.Errorf("parsing: %v", err)
    		return
    	}
    
    	outb, err := gofmtFile(file)
    	if err != nil {
    		t.Errorf("printing: %v", err)
    		return
    	}
    	if s := string(outb); in != s && mustBeGofmt {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 05:31:47 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. src/cmd/cgo/internal/swig/swig_test.go

    	if len(matches[2]) > 0 {
    		minor = atoi(string(matches[2][1:]))
    	}
    	if len(matches[3]) > 0 {
    		patch = atoi(string(matches[3][1:]))
    	}
    	if parseError != nil {
    		t.Logf("error parsing swig version %q, continuing anyway: %s", string(matches[0]), parseError)
    		return
    	}
    	t.Logf("found swig version %d.%d.%d", major, minor, patch)
    	if major < 3 || (major == 3 && minor == 0 && patch < 6) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 12:38:14 UTC 2024
    - 4K bytes
    - Viewed (0)
Back to top