Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for IsLiteral (0.08 sec)

  1. src/cmd/go/internal/search/search.go

    func (m *Match) AddError(err error) {
    	m.Errs = append(m.Errs, &MatchError{Match: m, Err: err})
    }
    
    // IsLiteral reports whether the pattern is free of wildcards and meta-patterns.
    //
    // A literal pattern must match at most one package.
    func (m *Match) IsLiteral() bool {
    	return !strings.Contains(m.pattern, "...") && !m.IsMeta()
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 31 20:33:05 UTC 2023
    - 15.4K bytes
    - Viewed (0)
  2. src/regexp/all_test.go

    		// Literal method needs to scan the pattern.
    		re := MustCompile(tc.pattern)
    		str, complete := re.LiteralPrefix()
    		if complete != tc.isLiteral {
    			t.Errorf("LiteralPrefix(`%s`) = %t; want %t", tc.pattern, complete, tc.isLiteral)
    		}
    		if str != tc.literal {
    			t.Errorf("LiteralPrefix(`%s`) = `%s`; want `%s`", tc.pattern, str, tc.literal)
    		}
    	}
    }
    
    type subexpIndex struct {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:36:03 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  3. src/go/scanner/scanner_test.go

    	"strings"
    	"testing"
    )
    
    var fset = token.NewFileSet()
    
    const /* class */ (
    	special = iota
    	literal
    	operator
    	keyword
    )
    
    func tokenclass(tok token.Token) int {
    	switch {
    	case tok.IsLiteral():
    		return literal
    	case tok.IsOperator():
    		return operator
    	case tok.IsKeyword():
    		return keyword
    	}
    	return special
    }
    
    type elt struct {
    	tok   token.Token
    	lit   string
    	class int
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 28 15:38:31 UTC 2023
    - 34.6K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apiserver/pkg/cel/library/cost.go

    			sz := l.sizeEstimate(*target)
    
    			// Worst case size is where is that a separator of "" is used, and each char is returned as a list element.
    			max := sz.Max
    			if len(args) > 1 {
    				if v := args[1].Expr().AsLiteral(); v != nil {
    					if i, ok := v.Value().(int64); ok {
    						max = uint64(i)
    					}
    				}
    			}
    			// Cost is the traversal plus the construction of the result.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 17:22:44 UTC 2024
    - 20.6K bytes
    - Viewed (0)
Back to top