Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 50 for Decl (0.05 sec)

  1. src/cmd/compile/internal/syntax/printer.go

    	case *FuncDecl:
    		return _Func, nil
    	default:
    		panic("unreachable")
    	}
    }
    
    type printGroup struct {
    	node
    	Tok   token
    	Decls []Decl
    }
    
    func (p *printer) printDecl(list []Decl) {
    	tok, group := groupFor(list[0])
    
    	if group == nil {
    		if len(list) != 1 {
    			panic("unreachable")
    		}
    		p.printNode(list[0])
    		return
    	}
    
    	// if _, ok := list[0].(*EmptyDecl); ok {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/check.go

    	environment
    
    	// debugging
    	indent int // indentation for tracing
    }
    
    // addDeclDep adds the dependency edge (check.decl -> to) if check.decl exists
    func (check *Checker) addDeclDep(to Object) {
    	from := check.decl
    	if from == nil {
    		return // not in a package-level init expression
    	}
    	if _, found := check.objMap[to]; !found {
    		return // to is not a package-level object
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  3. src/go/printer/printer.go

    	Node     any // *ast.File, or ast.Expr, ast.Decl, ast.Spec, or ast.Stmt
    	Comments []*ast.CommentGroup
    }
    
    // Fprint "pretty-prints" an AST node to output for a given configuration cfg.
    // Position information is interpreted relative to the file set fset.
    // The node type must be *[ast.File], *[CommentedNode], [][ast.Decl], [][ast.Stmt],
    // or assignment-compatible to [ast.Expr], [ast.Decl], [ast.Spec], or [ast.Stmt].
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 41.6K bytes
    - Viewed (0)
  4. src/go/types/check.go

    	environment
    
    	// debugging
    	indent int // indentation for tracing
    }
    
    // addDeclDep adds the dependency edge (check.decl -> to) if check.decl exists
    func (check *Checker) addDeclDep(to Object) {
    	from := check.decl
    	if from == nil {
    		return // not in a package-level init expression
    	}
    	if _, found := check.objMap[to]; !found {
    		return // to is not a package-level object
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  5. test/codegen/arithmetic.go

    	// amd64:`SUBQ\s[A-Z]+,\s24\([A-Z]+\)`
    	arr[3] -= b
    	// 386:`DECL\s16\([A-Z]+\)`
    	arr[4]--
    	// 386:`ADDL\s[$]-20,\s20\([A-Z]+\)`
    	arr[5] -= 20
    	// 386:`SUBL\s\([A-Z]+\)\([A-Z]+\*4\),\s[A-Z]+`
    	ef -= arr[b]
    	// 386:`SUBL\s[A-Z]+,\s\([A-Z]+\)\([A-Z]+\*4\)`
    	arr[c] -= b
    	// 386:`ADDL\s[$]-15,\s\([A-Z]+\)\([A-Z]+\*4\)`
    	arr[d] -= 15
    	// 386:`DECL\s\([A-Z]+\)\([A-Z]+\*4\)`
    	arr[b]--
    	// amd64:`DECQ\s64\([A-Z]+\)`
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:28:00 UTC 2024
    - 15.2K bytes
    - Viewed (0)
  6. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/tests/tests.go

    }
    
    func run(pass *analysis.Pass) (interface{}, error) {
    	for _, f := range pass.Files {
    		if !strings.HasSuffix(pass.Fset.File(f.Pos()).Name(), "_test.go") {
    			continue
    		}
    		for _, decl := range f.Decls {
    			fn, ok := decl.(*ast.FuncDecl)
    			if !ok || fn.Recv != nil {
    				// Ignore non-functions or functions with receivers.
    				continue
    			}
    			switch {
    			case strings.HasPrefix(fn.Name.Name, "Example"):
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 14.4K bytes
    - Viewed (0)
  7. src/go/types/stmt.go

    	// (and use 0 indentation at function start)
    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel {
    		check.labels(body)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/issues_test.go

    		if err != nil {
    			if _, ok := err.(Error); !ok {
    				t.Fatal(err)
    			}
    		}
    
    		syntax.Inspect(f, func(n syntax.Node) bool {
    			if decl, _ := n.(*syntax.TypeDecl); decl != nil {
    				if tv, ok := info.Types[decl.Type]; ok && decl.Name.Value == "T" {
    					want := strings.Count(src, ";") + 1
    					if got := tv.Type.(*Struct).NumFields(); got != want {
    						t.Errorf("%s: got %d fields; want %d", src, got, want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    		a.apply(n, "Value", nil, n.Value)
    
    	case *ast.ChanType:
    		a.apply(n, "Value", nil, n.Value)
    
    	// Statements
    	case *ast.BadStmt:
    		// nothing to do
    
    	case *ast.DeclStmt:
    		a.apply(n, "Decl", nil, n.Decl)
    
    	case *ast.EmptyStmt:
    		// nothing to do
    
    	case *ast.LabeledStmt:
    		a.apply(n, "Label", nil, n.Label)
    		a.apply(n, "Stmt", nil, n.Stmt)
    
    	case *ast.ExprStmt:
    		a.apply(n, "X", nil, n.X)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  10. src/go/build/read.go

    	if info.parseErr != nil {
    		return nil
    	}
    
    	hasEmbed := false
    	for _, decl := range info.parsed.Decls {
    		d, ok := decl.(*ast.GenDecl)
    		if !ok {
    			continue
    		}
    		for _, dspec := range d.Specs {
    			spec, ok := dspec.(*ast.ImportSpec)
    			if !ok {
    				continue
    			}
    			quoted := spec.Path.Value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
Back to top