- Sort Score
- Result 10 results
- Languages All
Results 1 - 4 of 4 for LabeledStmt (0.11 sec)
-
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/go/printer/testdata/parser.go
// Go spec: The scope of a label is the body of the function // in which it is declared and excludes the body of any nested // function. stmt := &ast.LabeledStmt{label, colon, p.parseStmt()} p.declare(stmt, p.labelScope, ast.Lbl, label) return stmt } p.error(x[0].Pos(), "illegal label declaration") return &ast.BadStmt{x[0].Pos(), colon + 1}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jul 20 20:19:51 UTC 2023 - 50.5K bytes - Viewed (0) -
src/go/printer/nodes.go
// labeled statements put labels on a separate line, but here // we only care about the start line of the actual statement // without label - correct line for each label for t := s; ; { lt, _ := t.(*ast.LabeledStmt) if lt == nil { break } line++ t = lt.Stmt } i++ } } if nindent > 0 { p.print(unindent) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/go/parser/parser.go
// Go spec: The scope of a label is the body of the function // in which it is declared and excludes the body of any nested // function. stmt := &ast.LabeledStmt{Label: label, Colon: colon, Stmt: p.parseStmt()} return stmt, false } // The label declaration typically starts at x[0].Pos(), but the label
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Dec 08 20:07:50 UTC 2023 - 72.2K bytes - Viewed (0)