Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 23 for BlockStmt (0.13 sec)

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

    	// The Scopes mapping does not contain an entry for the
    	// function body ([*ast.BlockStmt]); the function's scope is
    	// associated with the [*ast.FuncType].
    	//
    	// The following node types may appear in Scopes:
    	//
    	//     *syntax.File
    	//     *syntax.FuncType
    	//     *syntax.TypeDecl
    	//     *syntax.BlockStmt
    	//     *syntax.IfStmt
    	//     *syntax.SwitchStmt
    	//     *syntax.CaseClause
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  2. src/go/parser/resolver.go

    		// add to list of unresolved targets
    		if n.Tok != token.FALLTHROUGH && n.Label != nil {
    			depth := len(r.targetStack) - 1
    			r.targetStack[depth] = append(r.targetStack[depth], n.Label)
    		}
    
    	case *ast.BlockStmt:
    		r.openScope(n.Pos())
    		defer r.closeScope()
    		r.walkStmts(n.List)
    
    	case *ast.IfStmt:
    		r.openScope(n.Pos())
    		defer r.closeScope()
    		if n.Init != nil {
    			ast.Walk(r, n.Init)
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 12:56:53 UTC 2023
    - 15.8K bytes
    - Viewed (0)
  3. src/go/types/stmt.go

    package types
    
    import (
    	"go/ast"
    	"go/constant"
    	"go/token"
    	"internal/buildcfg"
    	. "internal/types/errors"
    	"sort"
    )
    
    func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *ast.BlockStmt, iota constant.Value) {
    	if check.conf.IgnoreFuncBodies {
    		panic("function body not ignored")
    	}
    
    	if check.conf._Trace {
    		check.trace(body.Pos(), "-- %s: %s", name, sig)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/stmt.go

    import (
    	"cmd/compile/internal/syntax"
    	"go/constant"
    	"internal/buildcfg"
    	. "internal/types/errors"
    	"sort"
    )
    
    func (check *Checker) funcBody(decl *declInfo, name string, sig *Signature, body *syntax.BlockStmt, iota constant.Value) {
    	if check.conf.IgnoreFuncBodies {
    		panic("function body not ignored")
    	}
    
    	if check.conf.Trace {
    		check.trace(body.Pos(), "-- %s: %s", name, sig)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  5. src/cmd/vendor/golang.org/x/tools/go/cfg/builder.go

    		goto start // effectively: tailcall stmt(g, s.Stmt, label)
    
    	case *ast.ReturnStmt:
    		b.add(s)
    		b.current = b.newBlock(KindUnreachable, s)
    
    	case *ast.BranchStmt:
    		b.branchStmt(s)
    
    	case *ast.BlockStmt:
    		b.stmtList(s.List)
    
    	case *ast.IfStmt:
    		if s.Init != nil {
    			b.stmt(s.Init)
    		}
    		then := b.newBlock(KindIfThen, s)
    		done := b.newBlock(KindIfDone, s)
    		_else := done
    		if s.Else != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 11.4K bytes
    - Viewed (0)
  6. src/cmd/cgo/ast.go

    		}
    	case *ast.GoStmt:
    		f.walk(n.Call, ctxExpr, visit)
    	case *ast.DeferStmt:
    		f.walk(n.Call, ctxDefer, visit)
    	case *ast.ReturnStmt:
    		f.walk(n.Results, ctxExpr, visit)
    	case *ast.BranchStmt:
    	case *ast.BlockStmt:
    		f.walk(n.List, context, visit)
    	case *ast.IfStmt:
    		f.walk(n.Init, ctxStmt, visit)
    		f.walk(&n.Cond, ctxExpr, visit)
    		f.walk(n.Body, ctxStmt, visit)
    		f.walk(n.Else, ctxStmt, visit)
    	case *ast.CaseClause:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 07 16:54:27 UTC 2023
    - 14.3K bytes
    - Viewed (0)
  7. src/cmd/vendor/golang.org/x/tools/go/ast/astutil/rewrite.go

    	case *ast.DeferStmt:
    		a.apply(n, "Call", nil, n.Call)
    
    	case *ast.ReturnStmt:
    		a.applyList(n, "Results")
    
    	case *ast.BranchStmt:
    		a.apply(n, "Label", nil, n.Label)
    
    	case *ast.BlockStmt:
    		a.applyList(n, "List")
    
    	case *ast.IfStmt:
    		a.apply(n, "Init", nil, n.Init)
    		a.apply(n, "Cond", nil, n.Cond)
    		a.apply(n, "Body", nil, n.Body)
    		a.apply(n, "Else", nil, n.Else)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/syntax/printer.go

    		p.print(_Return)
    		if n.Results != nil {
    			p.print(blank, n.Results)
    		}
    
    	case *BranchStmt:
    		p.print(n.Tok)
    		if n.Label != nil {
    			p.print(blank, n.Label)
    		}
    
    	case *BlockStmt:
    		p.print(_Lbrace)
    		if len(n.List) > 0 {
    			p.print(newline, indent)
    			p.printStmtList(n.List, true)
    			p.print(outdent, newline)
    		}
    		p.print(_Rbrace)
    
    	case *IfStmt:
    		p.print(_If, blank)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ir/fmt.go

    		n := n.(*AssignListStmt)
    		if n.Def && !complexinit {
    			fmt.Fprintf(s, "%.v := %.v", n.Lhs, n.Rhs)
    		} else {
    			fmt.Fprintf(s, "%.v = %.v", n.Lhs, n.Rhs)
    		}
    
    	case OBLOCK:
    		n := n.(*BlockStmt)
    		if len(n.List) != 0 {
    			fmt.Fprintf(s, "%v", n.List)
    		}
    
    	case ORETURN:
    		n := n.(*ReturnStmt)
    		fmt.Fprintf(s, "return %.v", n.Results)
    
    	case OTAILCALL:
    		n := n.(*TailCallStmt)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/staticinit/sched.go

    		return false
    	}
    	if len(call.Body) != 2 || call.Body[0].Op() != ir.OBLOCK || call.Body[1].Op() != ir.OLABEL {
    		return false
    	}
    	label := call.Body[1].(*ir.LabelStmt).Label
    	block := call.Body[0].(*ir.BlockStmt)
    	list := block.List
    	var dcl *ir.Decl
    	if len(list) == 3 && list[0].Op() == ir.ODCL {
    		dcl = list[0].(*ir.Decl)
    		list = list[1:]
    	}
    	if len(list) != 2 ||
    		list[0].Op() != ir.OAS2 ||
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top