Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 48 for BlockStmt (0.14 sec)

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

    	{"Field", `@x, y, z T`},
    	{"Field", `@x, y, z (*T)`},
    }
    
    var stmts = []test{
    	{"EmptyStmt", `@`},
    
    	{"LabeledStmt", `L@:`},
    	{"LabeledStmt", `L@: ;`},
    	{"LabeledStmt", `L@: f()`},
    
    	{"BlockStmt", `@{}`},
    
    	// The position of an ExprStmt is the position of the expression.
    	{"ExprStmt", `@<-ch`},
    	{"ExprStmt", `f@()`},
    	{"ExprStmt", `append@(s, 1, 2, 3)`},
    
    	{"SendStmt", `ch @<- x`},
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 02 18:45:06 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  2. 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)
  3. src/go/printer/nodes.go

    				}
    				line++
    				t = lt.Stmt
    			}
    			i++
    		}
    	}
    	if nindent > 0 {
    		p.print(unindent)
    	}
    }
    
    // block prints an *ast.BlockStmt; it always spans at least two lines.
    func (p *printer) block(b *ast.BlockStmt, nindent int) {
    	p.setPos(b.Lbrace)
    	p.print(token.LBRACE)
    	p.stmtList(b.List, nindent, true)
    	p.linebreak(p.lineFor(b.Rbrace), 1, ignore, true)
    	p.setPos(b.Rbrace)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.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