- Sort Score
- Result 10 results
- Languages All
Results 11 - 19 of 19 for LabeledStmt (0.16 sec)
-
src/cmd/cover/cover.go
// The result will then be // foo: COUNTER[n]++; stmt // However, we can't do this if the labeled statement is already // a control statement, such as a labeled for. if label, isLabel := stmt.(*ast.LabeledStmt); isLabel && !f.isControl(label.Stmt) { newLabel := *label newLabel.Stmt = &ast.EmptyStmt{ Semicolon: label.Stmt.Pos(), Implicit: true, }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 34.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
a.pos = pos a.Op = op a.Lhs = lhs a.Rhs = rhs return a } func (p *parser) labeledStmtOrNil(label *Name) Stmt { if trace { defer p.trace("labeledStmt")() } s := new(LabeledStmt) s.pos = p.pos() s.Label = label p.want(_Colon) if p.tok == _Rbrace { // We expect a statement (incl. an empty statement), which must be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
case *syntax.CaseClause: for i, s := range n.Body { n.Body[i] = r.editStmt(s) } case *syntax.CommClause: for i, s := range n.Body { n.Body[i] = r.editStmt(s) } case *syntax.LabeledStmt: n.Stmt = r.editStmt(n.Stmt) } // Pop n. if len(r.forStack) > 0 && r.stack[len(r.stack)-1] == r.forStack[len(r.forStack)-1].nfor { r.endLoop(r.forStack[len(r.forStack)-1])
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/go/parser/parser_test.go
} var pos, end token.Pos ast.Inspect(f, func(x ast.Node) bool { switch s := x.(type) { case *ast.BlockStmt: pos, end = s.Pos()+1, s.End()-1 // exclude "{", "}" case *ast.LabeledStmt: pos, end = s.Pos()+2, s.End() // exclude "L:" case *ast.EmptyStmt: // check containment if s.Pos() < pos || s.End() > end {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/go/types/stmt.go
inner := ctxt &^ (fallthroughOk | finalSwitchCase | inTypeSwitch) switch s := s.(type) { case *ast.BadStmt, *ast.EmptyStmt: // ignore case *ast.DeclStmt: check.declStmt(s.Decl) case *ast.LabeledStmt: check.hasLabel = true check.stmt(ctxt, s.Stmt) case *ast.ExprStmt: // spec: "With the exception of specific built-in functions, // function and method calls and receive operations can appear
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/stmt.go
inner := ctxt &^ (fallthroughOk | finalSwitchCase | inTypeSwitch) switch s := s.(type) { case *syntax.EmptyStmt: // ignore case *syntax.DeclStmt: check.declStmt(s.DeclList) case *syntax.LabeledStmt: check.hasLabel = true check.stmt(ctxt, s.Stmt) case *syntax.ExprStmt: // spec: "With the exception of specific built-in functions, // function and method calls and receive operations can appear
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 30.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"KeyValueExpr", Type, 0}, {"KeyValueExpr.Colon", Field, 0}, {"KeyValueExpr.Key", Field, 0}, {"KeyValueExpr.Value", Field, 0}, {"LabeledStmt", Type, 0}, {"LabeledStmt.Colon", Field, 0}, {"LabeledStmt.Label", Field, 0}, {"LabeledStmt.Stmt", Field, 0}, {"Lbl", Const, 0}, {"MapType", Type, 0}, {"MapType.Key", Field, 0}, {"MapType.Map", Field, 0}, {"MapType.Value", Field, 0},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0) -
doc/go1.17_spec.html
is performed before adding <code>x</code>. </p> <h2 id="Statements">Statements</h2> <p> Statements control execution. </p> <pre class="ebnf"> Statement = Declaration | LabeledStmt | SimpleStmt | GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt | FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt | DeferStmt .
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 11 20:22:45 UTC 2024 - 211.6K bytes - Viewed (0) -
doc/go_spec.html
is performed before adding <code>x</code>. </p> <h2 id="Statements">Statements</h2> <p> Statements control execution. </p> <pre class="ebnf"> Statement = Declaration | LabeledStmt | SimpleStmt | GoStmt | ReturnStmt | BreakStmt | ContinueStmt | GotoStmt | FallthroughStmt | Block | IfStmt | SwitchStmt | SelectStmt | ForStmt | DeferStmt .
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jun 04 21:07:21 UTC 2024 - 281.5K bytes - Viewed (1)