Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 173 for isIdent (0.5 sec)

  1. src/go/types/generate_test.go

    		case *ast.CallExpr:
    			if isIdent(n.Fun, "sprintf") && len(n.Args) >= 4 /* ... args */ {
    				n.Args = insert(n.Args, 1, newIdent(n.Args[1].Pos(), "nil"))
    				return false
    			}
    		}
    		return true
    	})
    }
    
    // asIdent returns x as *ast.Ident if it is an identifier with the given name.
    func asIdent(x ast.Node, name string) *ast.Ident {
    	if ident, _ := x.(*ast.Ident); ident != nil && ident.Name == name {
    		return ident
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  2. src/go/build/read.go

    			r.syntaxError()
    			return
    		}
    	}
    	if isIdent(r.peekByte(false)) {
    		r.syntaxError()
    	}
    }
    
    // readIdent reads an identifier from the input.
    // If an identifier is not present, readIdent records a syntax error.
    func (r *importReader) readIdent() {
    	c := r.peekByte(true)
    	if !isIdent(c) {
    		r.syntaxError()
    		return
    	}
    	for isIdent(r.peekByte(false)) {
    		r.peek = 0
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    			}
    		}
    		in.endToken(_STRING)
    		return
    	}
    
    	// Checked all punctuation. Must be identifier token.
    	if c := in.peekRune(); !isIdent(c) {
    		in.Error(fmt.Sprintf("unexpected input character %#q", c))
    	}
    
    	// Scan over identifier.
    	for isIdent(in.peekRune()) {
    		if in.peekPrefix("//") {
    			break
    		}
    		if in.peekPrefix("/*") {
    			in.Error("mod files must use // comments (not /* */ comments)")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. src/go/printer/printer_test.go

    	if err != nil {
    		panic(err) // error in test
    	}
    
    	for indent := 0; indent < 4; indent++ {
    		indent := indent
    		t.Run(fmt.Sprint(indent), func(t *testing.T) {
    			t.Parallel()
    			var buf bytes.Buffer
    			(&Config{Tabwidth: tabwidth, Indent: indent}).Fprint(&buf, fset, file)
    			// all code must be indented by at least 'indent' tabs
    			lines := bytes.Split(buf.Bytes(), []byte{'\n'})
    			for i, line := range lines {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:25 UTC 2024
    - 20.4K bytes
    - Viewed (0)
  5. src/go/types/typexpr.go

    	. "internal/types/errors"
    	"strings"
    )
    
    // ident type-checks identifier e and initializes x with the value or type of e.
    // If an error occurred, x.mode is set to invalid.
    // For the meaning of def, see Checker.definedType, below.
    // If wantType is set, the identifier e is expected to denote a type.
    func (check *Checker) ident(x *operand, e *ast.Ident, def *TypeName, wantType bool) {
    	x.mode = invalid
    	x.expr = e
    
    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/stmt.go

    	// (and use 0 indentation at function start)
    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel {
    		check.labels(body)
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typexpr.go

    // Must only be called by definedType or genericType.
    func (check *Checker) typInternal(e0 syntax.Expr, def *TypeName) (T Type) {
    	if check.conf.Trace {
    		check.trace(e0.Pos(), "-- type %s", e0)
    		check.indent++
    		defer func() {
    			check.indent--
    			var under Type
    			if T != nil {
    				// Calling under() here may lead to endless instantiations.
    				// Test case: type T[P any] *T[P]
    				under = safeUnderlying(T)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/stmt.go

    	// (and use 0 indentation at function start)
    	defer func(env environment, indent int) {
    		check.environment = env
    		check.indent = indent
    	}(check.environment, check.indent)
    	check.environment = environment{
    		decl:  decl,
    		scope: sig.scope,
    		iota:  iota,
    		sig:   sig,
    	}
    	check.indent = 0
    
    	check.stmtList(0, body.List)
    
    	if check.hasLabel && !check.conf.IgnoreBranchErrors {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  9. manifests/charts/gateways/istio-egress/templates/injected-deployment.yaml

          {{- include "podAntiAffinity" $gateway | indent 6 }}
    {{- if $gateway.tolerations }}
          tolerations:
    {{ toYaml $gateway.tolerations | indent 6 }}
    {{- else if .Values.global.defaultTolerations }}
          tolerations:
    {{ toYaml .Values.global.defaultTolerations | indent 6 }}
    {{- end }}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 18:16:49 UTC 2024
    - 5K bytes
    - Viewed (0)
  10. manifests/charts/gateways/istio-ingress/templates/injected-deployment.yaml

          {{- include "podAntiAffinity" $gateway | indent 6 }}
    {{- if $gateway.tolerations }}
          tolerations:
    {{ toYaml $gateway.tolerations | indent 6 }}
    {{- else if .Values.global.defaultTolerations }}
          tolerations:
    {{ toYaml .Values.global.defaultTolerations | indent 6 }}
    {{- end }}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 18 18:16:49 UTC 2024
    - 5K bytes
    - Viewed (0)
Back to top