Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ConstDecl (0.22 sec)

  1. src/cmd/compile/internal/types2/decl.go

    	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
    	for index, decl := range list {
    		if _, ok := decl.(*syntax.ConstDecl); !ok {
    			first = -1 // we're not in a constant declaration
    		}
    
    		switch s := decl.(type) {
    		case *syntax.ConstDecl:
    			top := len(check.delayed)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 29.6K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/resolver.go

    		first := -1                // index of first ConstDecl in the current group, or -1
    		var last *syntax.ConstDecl // last ConstDecl with init expressions, or nil
    		for index, decl := range file.DeclList {
    			if _, ok := decl.(*syntax.ConstDecl); !ok {
    				first = -1 // we're not in a constant declaration
    			}
    
    			switch s := decl.(type) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  3. src/go/types/decl.go

    	importDecl struct{ spec *ast.ImportSpec }
    	constDecl  struct {
    		spec      *ast.ValueSpec
    		iota      int
    		typ       ast.Expr
    		init      []ast.Expr
    		inherited bool
    	}
    	varDecl  struct{ spec *ast.ValueSpec }
    	typeDecl struct{ spec *ast.TypeSpec }
    	funcDecl struct{ decl *ast.FuncDecl }
    )
    
    func (d importDecl) node() ast.Node { return d.spec }
    func (d constDecl) node() ast.Node  { return d.spec }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/syntax/printer.go

    		p.print(n.Body)
    
    	case *ImportDecl:
    		if n.Group == nil {
    			p.print(_Import, blank)
    		}
    		if n.LocalPkgName != nil {
    			p.print(n.LocalPkgName, blank)
    		}
    		p.print(n.Path)
    
    	case *ConstDecl:
    		if n.Group == nil {
    			p.print(_Const, blank)
    		}
    		p.printNameList(n.NameList)
    		if n.Type != nil {
    			p.print(blank, n.Type)
    		}
    		if n.Values != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  5. src/go/types/resolver.go

    					}
    				} else {
    					// declare imported package object in file scope
    					// (no need to provide s.Name since we called check.recordDef earlier)
    					check.declare(fileScope, nil, pkgName, nopos)
    				}
    			case constDecl:
    				// declare all constants
    				for i, name := range d.spec.Names {
    					obj := NewConst(name.Pos(), pkg, name.Name, nil, constant.MakeInt64(int64(d.iota)))
    
    					var init ast.Expr
    					if i < len(d.init) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
Back to top