Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for InvalidSyntaxTree (0.41 sec)

  1. src/go/types/stmt.go

    		case *ast.AssignStmt:
    			if len(guard.Lhs) != 1 || guard.Tok != token.DEFINE || len(guard.Rhs) != 1 {
    				check.error(s, InvalidSyntaxTree, "incorrect form of type switch guard")
    				return
    			}
    
    			lhs, _ = guard.Lhs[0].(*ast.Ident)
    			if lhs == nil {
    				check.error(s, InvalidSyntaxTree, "incorrect form of type switch guard")
    				return
    			}
    
    			if lhs.Name == "_" {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  2. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/errorcode_string.go

    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[InvalidSyntaxTree - -1]
    	_ = x[Test-1]
    	_ = x[BlankPkgName-2]
    	_ = x[MismatchedPkgName-3]
    	_ = x[InvalidPkgUse-4]
    	_ = x[BadImportPath-5]
    	_ = x[BrokenImport-6]
    	_ = x[ImportCRenamed-7]
    	_ = x[UnusedImport-8]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 02:20:05 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  3. src/internal/types/errors/code_string.go

    package errors
    
    import "strconv"
    
    func _() {
    	// An "invalid array index" compiler error signifies that the constant values have changed.
    	// Re-run the stringer command to generate them again.
    	var x [1]struct{}
    	_ = x[InvalidSyntaxTree - -1]
    	_ = x[Test-1]
    	_ = x[BlankPkgName-2]
    	_ = x[MismatchedPkgName-3]
    	_ = x[InvalidPkgUse-4]
    	_ = x[BadImportPath-5]
    	_ = x[BrokenImport-6]
    	_ = x[ImportCRenamed-7]
    	_ = x[UnusedImport-8]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 22:50:48 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  4. src/go/types/struct.go

    			// pointer type."
    			pos := f.Type.Pos() // position of type, for errors
    			name := embeddedFieldIdent(f.Type)
    			if name == nil {
    				check.errorf(f.Type, InvalidSyntaxTree, "embedded field type %s has no name", f.Type)
    				name = ast.NewIdent("_")
    				name.NamePos = pos
    				addInvalid(name)
    				continue
    			}
    			add(name, true) // struct{p.T} field has position of T
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/struct.go

    			// pointer type."
    			pos := syntax.StartPos(f.Type) // position of type, for errors
    			name := embeddedFieldIdent(f.Type)
    			if name == nil {
    				check.errorf(pos, InvalidSyntaxTree, "invalid embedded field type %s", f.Type)
    				name = syntax.NewName(pos, "_")
    				addInvalid(name)
    				continue
    			}
    			add(name, true) // struct{p.T} field has position of T
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 6.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    				}
    				check.error(s, MisplacedFallthrough, msg)
    			}
    		case syntax.Goto:
    			// goto's must have labels, should have been caught above
    			fallthrough
    		default:
    			check.errorf(s, InvalidSyntaxTree, "branch statement: %s", s.Tok)
    		}
    
    	case *syntax.BlockStmt:
    		check.openScope(s, "block")
    		defer check.closeScope()
    
    		check.stmtList(inner, s.List)
    
    	case *syntax.IfStmt:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/index.go

    func (check *Checker) singleIndex(e *syntax.IndexExpr) syntax.Expr {
    	index := e.Index
    	if index == nil {
    		check.errorf(e, InvalidSyntaxTree, "missing index for %s", e.X)
    		return nil
    	}
    	if l, _ := index.(*syntax.ListExpr); l != nil {
    		if n := len(l.ElemList); n <= 1 {
    			check.errorf(e, InvalidSyntaxTree, "invalid use of ListExpr for index expression %v with %d indices", e, n)
    			return nil
    		}
    		// len(l.ElemList) > 1
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  8. src/go/types/interface.go

    			continue // ignore
    		}
    
    		typ := check.typ(f.Type)
    		sig, _ := typ.(*Signature)
    		if sig == nil {
    			if isValid(typ) {
    				check.errorf(f.Type, InvalidSyntaxTree, "%s is not a method signature", typ)
    			}
    			continue // ignore
    		}
    
    		// The go/parser doesn't accept method type parameters but an ast.FuncType may have them.
    		if sig.tparams != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/signature.go

    		// care if a constructed AST contains a non-nil tag.
    		if field.Name != nil {
    			// named parameter
    			name := field.Name.Value
    			if name == "" {
    				check.error(field.Name, InvalidSyntaxTree, "anonymous parameter")
    				// ok to continue
    			}
    			par := NewParam(field.Name.Pos(), check.pkg, name, typ)
    			check.declare(scope, field.Name, par, scopePos)
    			params = append(params, par)
    			named = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  10. src/go/types/index.go

    		x.mode = invalid
    		return
    	}
    
    	x.mode = value
    
    	// spec: "Only the first index may be omitted; it defaults to 0."
    	if e.Slice3 && (e.High == nil || e.Max == nil) {
    		check.error(inNode(e, e.Rbrack), InvalidSyntaxTree, "2nd and 3rd index required in 3-index slice")
    		x.mode = invalid
    		return
    	}
    
    	// check indices
    	var ind [3]int64
    	for i, expr := range []ast.Expr{e.Low, e.High, e.Max} {
    		x := int64(-1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
Back to top