Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for BadExpr (0.1 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. src/go/types/resolver.go

    		rtyp = ix.X
    		if unpackParams {
    			for _, arg := range ix.Indices {
    				var par *ast.Ident
    				switch arg := arg.(type) {
    				case *ast.Ident:
    					par = arg
    				case *ast.BadExpr:
    					// ignore - error already reported by parser
    				case nil:
    					check.error(ix.Orig, InvalidSyntaxTree, "parameterized receiver contains nil parameters")
    				default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/expr.go

    	old, found := check.untyped[x]
    	if !found {
    		return // nothing to do
    	}
    
    	// update operands of x if necessary
    	switch x := x.(type) {
    	case *syntax.BadExpr,
    		*syntax.FuncLit,
    		*syntax.CompositeLit,
    		*syntax.IndexExpr,
    		*syntax.SliceExpr,
    		*syntax.AssertExpr,
    		*syntax.ListExpr,
    		//*syntax.StarExpr,
    		*syntax.KeyValueExpr,
    		*syntax.ArrayType,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
Back to top