Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for BlockStmt (0.21 sec)

  1. src/cmd/compile/internal/rangefunc/rewrite.go

    // A rewriter implements rewriting the range-over-funcs in a given function.
    type rewriter struct {
    	pkg   *types2.Package
    	info  *types2.Info
    	sig   *types2.Signature
    	outer *syntax.FuncType
    	body  *syntax.BlockStmt
    
    	// References to important types and values.
    	any   types2.Object
    	bool  types2.Object
    	int   types2.Object
    	true  types2.Object
    	false types2.Object
    
    	// Branch numbering, computed as needed.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  2. src/go/doc/example.go

    }
    
    // stripOutputComment finds and removes the "Output:" or "Unordered output:"
    // comment from body and comments, and adjusts the body block's end position.
    func stripOutputComment(body *ast.BlockStmt, comments []*ast.CommentGroup) (*ast.BlockStmt, []*ast.CommentGroup) {
    	// Do nothing if there is no "Output:" or "Unordered output:" comment.
    	i, last := lastComment(body, comments)
    	if last == nil || !outputPrefix.MatchString(last.Text()) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  3. src/cmd/cover/cover.go

    		// we inserted above.
    		pos := f.fset.File(n.Body.End()).Pos(elseOffset + 4)
    		switch stmt := n.Else.(type) {
    		case *ast.IfStmt:
    			block := &ast.BlockStmt{
    				Lbrace: pos,
    				List:   []ast.Stmt{stmt},
    				Rbrace: stmt.End(),
    			}
    			n.Else = block
    		case *ast.BlockStmt:
    			stmt.Lbrace = pos
    		default:
    			panic("unexpected node type in if")
    		}
    		ast.Walk(f, n.Else)
    		return nil
    	case *ast.SelectStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 14 19:41:17 UTC 2024
    - 34.5K bytes
    - Viewed (0)
  4. src/go/types/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:
    	//
    	//     *ast.File
    	//     *ast.FuncType
    	//     *ast.TypeSpec
    	//     *ast.BlockStmt
    	//     *ast.IfStmt
    	//     *ast.SwitchStmt
    	//     *ast.TypeSwitchStmt
    	//     *ast.CaseClause
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. 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)
Back to top