Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 15 of 15 for declStmt (0.1 sec)

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

    			// don't print chan (<-chan T) as chan <-chan T
    			p.print(_Lparen)
    			p.print(n.Elem)
    			p.print(_Rparen)
    		} else {
    			p.print(n.Elem)
    		}
    
    	// statements
    	case *DeclStmt:
    		p.printDecl(n.DeclList)
    
    	case *EmptyStmt:
    		// nothing to print
    
    	case *LabeledStmt:
    		p.print(outdent, n.Label, _Colon, indent, newline, n.Stmt)
    
    	case *ExprStmt:
    		p.print(n.X)
    
    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/go/parser/parser_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	// RHS refers to undefined globals; LHS does not.
    	as := f.Decls[0].(*ast.FuncDecl).Body.List[0].(*ast.DeclStmt).Decl.(*ast.GenDecl).Specs[0].(*ast.ValueSpec)
    	for _, v := range as.Values {
    		id := v.(*ast.Ident)
    		if id.Obj != nil {
    			t.Errorf("rhs %s has Obj, should not", id.Name)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/decl.go

    	if !check.conf.IgnoreFuncBodies && fdecl.Body != nil {
    		check.later(func() {
    			check.funcBody(decl, obj.name, sig, fdecl.Body, nil)
    		}).describef(obj, "func %s", obj.name)
    	}
    }
    
    func (check *Checker) declStmt(list []syntax.Decl) {
    	pkg := check.pkg
    
    	first := -1                // index of first ConstDecl in the current group, or -1
    	var last *syntax.ConstDecl // last ConstDecl with init expressions, or nil
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  4. src/go/types/decl.go

    	if !check.conf.IgnoreFuncBodies && fdecl.Body != nil {
    		check.later(func() {
    			check.funcBody(decl, obj.name, sig, fdecl.Body, nil)
    		}).describef(obj, "func %s", obj.name)
    	}
    }
    
    func (check *Checker) declStmt(d ast.Decl) {
    	pkg := check.pkg
    
    	check.walkDecl(d, func(d decl) {
    		switch d := d.(type) {
    		case constDecl:
    			top := len(check.delayed)
    
    			// declare all constants
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/rulegen.go

    			u.node(field)
    		}
    	case *ast.Field:
    		u.node(node.Type)
    
    	// statements
    
    	case *ast.BlockStmt:
    		defer u.scoped()()
    		for _, stmt := range node.List {
    			u.node(stmt)
    		}
    	case *ast.DeclStmt:
    		u.node(node.Decl)
    	case *ast.IfStmt:
    		if node.Init != nil {
    			u.node(node.Init)
    		}
    		u.node(node.Cond)
    		u.node(node.Body)
    		if node.Else != nil {
    			u.node(node.Else)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 02 22:09:21 UTC 2023
    - 48.7K bytes
    - Viewed (0)
Back to top