Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for CheckExpr (0.18 sec)

  1. src/go/types/eval.go

    	if err != nil {
    		return TypeAndValue{}, err
    	}
    
    	info := &Info{
    		Types: make(map[ast.Expr]TypeAndValue),
    	}
    	err = CheckExpr(fset, pkg, pos, node, info)
    	return info.Types[node], err
    }
    
    // CheckExpr type checks the expression expr as if it had appeared at position
    // pos of package pkg. [Type] information about the expression is recorded in
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. src/go/types/eval_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	checkExpr := func(pos token.Pos, str string) (Object, error) {
    		expr, err := parser.ParseExprFrom(fset, "eval", str, 0)
    		if err != nil {
    			return nil, err
    		}
    
    		info := &Info{
    			Uses:       make(map[*ast.Ident]Object),
    			Selections: make(map[*ast.SelectorExpr]*Selection),
    		}
    		if err := CheckExpr(fset, pkg, pos, expr, info); err != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 15 19:56:15 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  3. src/go/types/version.go

    // If there are no files, the result is nil.
    // The position must be valid.
    func (check *Checker) fileFor(pos token.Pos) *ast.File {
    	assert(pos.IsValid())
    	// Eval and CheckExpr tests may not have any source files.
    	if len(check.files) == 0 {
    		return nil
    	}
    	for _, file := range check.files {
    		if file.FileStart <= pos && pos < file.FileEnd {
    			return file
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 23:12:40 UTC 2024
    - 3.2K bytes
    - Viewed (0)
Back to top