Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for BadExpr (0.23 sec)

  1. src/go/printer/testdata/parser.go

    		// TODO determine a better range for BadExpr below
    		par.List = []*ast.Field{{Type: &ast.BadExpr{pos, pos}}}
    		return par
    	}
    
    	// recv type must be of the form ["*"] identifier
    	recv := par.List[0]
    	base := deref(recv.Type)
    	if _, isIdent := base.(*ast.Ident); !isIdent {
    		p.errorExpected(base.Pos(), "(unqualified) identifier")
    		par.List = []*ast.Field{{Type: &ast.BadExpr{recv.Pos(), recv.End()}}}
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 20 20:19:51 UTC 2023
    - 50.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/parser/parser.go

    			if index[1] == nil {
    				p.error(colons[0], "middle index required in 3-index slice")
    				index[1] = &ast.BadExpr{From: colons[0] + 1, To: colons[1]}
    			}
    			if index[2] == nil {
    				p.error(colons[1], "final index required in 3-index slice")
    				index[2] = &ast.BadExpr{From: colons[1] + 1, To: rbrack}
    			}
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  4. 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)
  5. src/go/printer/nodes.go

    	_, ok := expr.(*ast.BinaryExpr)
    	return ok
    }
    
    func (p *printer) expr1(expr ast.Expr, prec1, depth int) {
    	p.setPos(expr.Pos())
    
    	switch x := expr.(type) {
    	case *ast.BadExpr:
    		p.print("BadExpr")
    
    	case *ast.Ident:
    		p.print(x)
    
    	case *ast.BinaryExpr:
    		if depth < 1 {
    			p.internalError("depth < 1:", depth)
    			depth = 1
    		}
    		p.binaryExpr(x, prec1, cutoff(x, depth), depth)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 17 18:53:17 UTC 2023
    - 52.6K bytes
    - Viewed (0)
  6. 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