- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for BadExpr (0.11 sec)
-
src/cmd/compile/internal/syntax/positions.go
return MakePos(n.Pos().Base(), 1, 1) // declarations // case *ImportDecl: // case *ConstDecl: // case *TypeDecl: // case *VarDecl: // case *FuncDecl: // expressions // case *BadExpr: // case *Name: // case *BasicLit: case *CompositeLit: if n.Type != nil { m = n.Type continue } return n.Pos() case *KeyValueExpr: m = n.Key // case *FuncLit:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 17:49:19 UTC 2024 - 6.5K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
} } } else { msg = "mixed named and unnamed parameters" } p.syntaxErrorAt(errPos, msg) } } return } func (p *parser) badExpr() *BadExpr { b := new(BadExpr) b.pos = p.pos() return b } // ---------------------------------------------------------------------------- // Statements
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/types/exprstring.go
// operator precedences. (This assumes that the AST was // generated by a Go parser.) switch x := x.(type) { default: fmt.Fprintf(buf, "(ast: %T)", x) // nil, ast.BadExpr, ast.KeyValueExpr case *ast.Ident: buf.WriteString(x.Name) case *ast.Ellipsis: buf.WriteString("...") if x.Elt != nil { WriteExpr(buf, x.Elt) } case *ast.BasicLit:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 08 19:31:44 UTC 2024 - 4.8K bytes - Viewed (0) -
src/go/ast/walk.go
Walk(v, n.Type) } if n.Tag != nil { Walk(v, n.Tag) } if n.Comment != nil { Walk(v, n.Comment) } case *FieldList: walkList(v, n.List) // Expressions case *BadExpr, *Ident, *BasicLit: // nothing to do case *Ellipsis: if n.Elt != nil { Walk(v, n.Elt) } case *FuncLit: Walk(v, n.Type) Walk(v, n.Body) case *CompositeLit:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 16 16:34:10 UTC 2024 - 6.4K bytes - Viewed (0) -
src/go/ast/ast.go
} // An expression is represented by a tree consisting of one // or more of the following concrete expression nodes. type ( // A BadExpr node is a placeholder for an expression containing // syntax errors for which a correct expression node cannot be // created. // BadExpr struct { From, To token.Pos // position range of bad expression } // An Ident node represents an identifier. Ident struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/cmd/compile/internal/types2/typexpr.go
check.trace(e0.Pos(), "=> %s // %s", T, goTypeName(T)) } else { check.trace(e0.Pos(), "=> %s (under = %s) // %s", T, under, goTypeName(T)) } }() } switch e := e0.(type) { case *syntax.BadExpr: // ignore - error reported before case *syntax.Name: var x operand check.ident(&x, e, def, true) switch x.mode { case typexpr: typ := x.typ setDefType(def, typ)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.6K bytes - Viewed (0) -
src/go/types/typexpr.go
check.trace(e0.Pos(), "=> %s // %s", T, goTypeName(T)) } else { check.trace(e0.Pos(), "=> %s (under = %s) // %s", T, under, goTypeName(T)) } }() } switch e := e0.(type) { case *ast.BadExpr: // ignore - error reported before case *ast.Ident: var x operand check.ident(&x, e, def, true) switch x.mode { case typexpr: typ := x.typ setDefType(def, typ)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0) -
src/go/types/expr.go
old, found := check.untyped[x] if !found { return // nothing to do } // update operands of x if necessary switch x := x.(type) { case *ast.BadExpr, *ast.FuncLit, *ast.CompositeLit, *ast.IndexExpr, *ast.SliceExpr, *ast.TypeAssertExpr, *ast.StarExpr, *ast.KeyValueExpr, *ast.ArrayType, *ast.StructType, *ast.FuncType,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 02:09:54 UTC 2024 - 49.7K bytes - Viewed (0) -
src/go/parser/parser_test.go
t.Errorf("for File.FileEnd, got %s, want %s", got, want) } } // TestIncompleteSelection ensures that an incomplete selector // expression is parsed as a (blank) *ast.SelectorExpr, not a // *ast.BadExpr. func TestIncompleteSelection(t *testing.T) { for _, src := range []string{ "package p; var _ = fmt.", // at EOF "package p; var _ = fmt.\ntype X int", // not at EOF } {
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/cmd/compile/internal/types2/resolver.go
rtyp = ptyp.X if unpackParams { for _, arg := range syntax.UnpackListExpr(ptyp.Index) { var par *syntax.Name switch arg := arg.(type) { case *syntax.Name: par = arg case *syntax.BadExpr: // ignore - error already reported by parser case nil: check.error(ptyp, InvalidSyntaxTree, "parameterized receiver contains nil parameters") default:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0)