Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for IsLiteral (0.13 sec)

  1. src/go/token/token.go

    	if tok, is_keyword := keywords[ident]; is_keyword {
    		return tok
    	}
    	return IDENT
    }
    
    // Predicates
    
    // IsLiteral returns true for tokens corresponding to identifiers
    // and basic type literals; it returns false otherwise.
    func (tok Token) IsLiteral() bool { return literal_beg < tok && tok < literal_end }
    
    // IsOperator returns true for tokens corresponding to operators and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 6.4K bytes
    - Viewed (0)
  2. src/go/parser/error_test.go

    			// don't use the position of auto-inserted (invisible) semicolons
    			if lit != ";" {
    				break
    			}
    			fallthrough
    		default:
    			prev = pos
    			var l int // token length
    			if tok.IsLiteral() {
    				l = len(lit)
    			} else {
    				l = len(tok.String())
    			}
    			here = prev + token.Pos(l)
    		}
    	}
    }
    
    // compareErrors compares the map of expected error messages with the list
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 19:47:49 UTC 2022
    - 5.9K bytes
    - Viewed (0)
  3. src/cmd/go/internal/modload/search.go

    	match := search.NewMatch(pattern)
    	if m == (module.Version{}) {
    		matchPackages(ctx, match, tags, includeStd, nil)
    	}
    
    	LoadModFile(ctx) // Sets Target, needed by fetch and matchPackages.
    
    	if !match.IsLiteral() {
    		matchPackages(ctx, match, tags, omitStd, []module.Version{m})
    		return match
    	}
    
    	root, isLocal, err := fetch(ctx, m)
    	if err != nil {
    		match.Errs = []error{err}
    		return match
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 08 17:55:15 UTC 2023
    - 7.9K bytes
    - Viewed (0)
Back to top