Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 2,686 for inNode (0.1 sec)

  1. src/go/types/util.go

    func argErrPos(call *ast.CallExpr) positioner { return inNode(call, call.Rparen) }
    
    // startPos returns the start position of node n.
    func startPos(n ast.Node) token.Pos { return n.Pos() }
    
    // endPos returns the position of the first character immediately after node n.
    func endPos(n ast.Node) token.Pos { return n.End() }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 1.7K bytes
    - Viewed (0)
  2. src/go/types/stmt.go

    			} else {
    				first = d
    			}
    		}
    	}
    }
    
    func (check *Checker) openScope(node ast.Node, comment string) {
    	scope := NewScope(check.scope, node.Pos(), node.End(), comment)
    	check.recordScope(node, scope)
    	check.scope = scope
    }
    
    func (check *Checker) closeScope() {
    	check.scope = check.scope.Parent()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  3. src/go/types/errors.go

    }
    
    func (e posSpan) Pos() token.Pos {
    	return e.pos
    }
    
    // inNode creates a posSpan for the given node.
    // Invariant: node.Pos() <= pos < node.End() (node.End() is the position of the
    // first byte after node within the source).
    func inNode(node ast.Node, pos token.Pos) posSpan {
    	start, end := node.Pos(), node.End()
    	if debug {
    		assert(start <= pos && pos < end)
    	}
    	return posSpan{start, pos, end}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  4. src/go/types/call.go

    			switch call.Fun.(type) {
    			case *ast.IndexExpr, *ast.IndexListExpr:
    				ix := typeparams.UnpackIndexExpr(call.Fun)
    				check.versionErrorf(inNode(call.Fun, ix.Lbrack), go1_18, "function instantiation")
    			default:
    				check.versionErrorf(inNode(call, call.Lparen), go1_18, "implicit function instantiation")
    			}
    		}
    		// rename type parameters to avoid problems with recursive calls
    		var tmp Type
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  5. 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} {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  6. src/go/types/typexpr.go

    		default:
    			check.errorf(&x, NotAType, "%s is not a type", &x)
    		}
    
    	case *ast.IndexExpr, *ast.IndexListExpr:
    		ix := typeparams.UnpackIndexExpr(e)
    		check.verifyVersionf(inNode(e, ix.Lbrack), go1_18, "type instantiation")
    		return check.instantiatedType(ix, def)
    
    	case *ast.ParenExpr:
    		// Generic types must be instantiated before they can be used in any form.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.3K bytes
    - Viewed (0)
  7. src/go/types/expr.go

    			// that the lhs expression type is determined in the
    			// first round and thus deleted from the map, and then
    			// not found in the second round (double insertion of
    			// the same expr node still just leads to one entry for
    			// that node, and it can only be deleted once).
    			// Be cautious and check for presence of entry.
    			// Example: var e, f = int(1<<""[f]) // go.dev/issue/11347
    			if info, found := check.untyped[x.expr]; found {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apimachinery/pkg/runtime/serializer/cbor/internal/modes/encode.go

    See the License for the specific language governing permissions and
    limitations under the License.
    */
    
    package modes
    
    import (
    	"github.com/fxamacker/cbor/v2"
    )
    
    var Encode cbor.EncMode = func() cbor.EncMode {
    	encode, err := cbor.EncOptions{
    		// Map keys need to be sorted to have deterministic output, and this is the order
    		// defined in RFC 8949 4.2.1 "Core Deterministic Encoding Requirements".
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 15 15:31:10 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  9. src/encoding/json/encode.go

    //
    // Boolean values encode as JSON booleans.
    //
    // Floating point, integer, and [Number] values encode as JSON numbers.
    // NaN and +/-Inf values will return an [UnsupportedValueError].
    //
    // String values encode as JSON strings coerced to valid UTF-8,
    // replacing invalid bytes with the Unicode replacement rune.
    // So that the JSON will be safe to embed inside HTML <script> tags,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 36.2K bytes
    - Viewed (0)
  10. src/internal/profile/encode.go

    package profile
    
    import (
    	"errors"
    	"fmt"
    	"sort"
    )
    
    func (p *Profile) decoder() []decoder {
    	return profileDecoder
    }
    
    // preEncode populates the unexported fields to be used by encode
    // (with suffix X) from the corresponding exported fields. The
    // exported fields are cleared up to facilitate testing.
    func (p *Profile) preEncode() {
    	strings := make(map[string]int)
    	addString(strings, "")
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 07 19:52:28 UTC 2023
    - 13.6K bytes
    - Viewed (0)
Back to top