Returns the current set of tokens
555184
function() {
        return {
            token: this.brain.get(this.TOKEN_KEY),
            refresh_token: this.brain.get(this.REFRESH_KEY),
            expire_date: this.brain.get(this.EXPIRY_KEY)
        }
    }
207877
public function getTokens()
    {
        $pool = null;
        $session = \PHPSession::singleton();
        if($session->hasAttribute(self::TOKEN_KEY)){
            $pool = $session->getAttribute(self::TOKEN_KEY);
        }
        if(is_null($pool)){
            $pool = [];
        }

        return $pool;
    }
1205287
function squashTokens (tokens) {
    var squashedTokens = [];

    var token, lastToken;
    for (var i = 0, numTokens = tokens.length; i < numTokens; ++i) {
      token = tokens[i];

      if (token) {
        if (token[0] === 'text' && lastToken && lastToken[0] === 'text') {
          lastToken[1] += token[1];
          lastToken[3] = token[3];
        } else {
          squashedTokens.push(token);
          lastToken = token;
        }
      }
    }

    return squashedTokens;
  }
164586
public function getStaticTokens()
    {
        $tokens = [];
        $sites = [];
        if (!$this->getValid()) {
            return $sites;
        }
        foreach ($this->xml->children() as $child) {
            if ($child->getName() == "token") {
                $token = $this->parseToken($child);
                if ($token !== false) {
                    $tokens[$token['token']] = $token;
                }
            }
        }
        return $tokens;
    }
1263250
def _get_status_tokens(self):
        "  "
        result = []

        # Display panes.
        for i, w in enumerate(self.pymux.arrangement.windows):
            if i > 0:
                result.append(('', ' '))

            if w == self.pymux.arrangement.get_active_window():
                style = 'class:window.current'
                format_str = self.pymux.window_status_current_format

            else:
                style = 'class:window'
                format_str = self.pymux.window_status_format

            result.append((
                style,
                format_pymux_string(self.pymux, format_str, window=w),
                self._create_select_window_handler(w)))

        return result
444176
public String getTokens() {
        String tokens = attrMixin.getAttribute(TOKENS);
        return tokens.isEmpty() ? null : tokens;
    }
680148
@Override
    public List<String> getTokens() {
        //List<String> tokens = new ArrayList<>();
        if (!tokens.isEmpty())
            return tokens;

        log.info("Starting prebuffering...");
        while (streamHasMoreTokens()) {
            tokens.add(nextTokenFromStream());
        }
        log.info("Tokens prefetch finished. Tokens size: [" + tokens.size() + "]");
        return tokens;
    }
683913
async def valid_token_set(self):
        """"""
        is_valid = False

        if self._auth_client.token:
            # Account for a token near expiration
            now = datetime.datetime.utcnow()
            skew = datetime.timedelta(seconds=60)
            if self._auth_client.expiry > (now + skew):
                is_valid = True
        return is_valid
10455
def look(self):
        """"""
        old_token = next(self)
        result = self.current
        self.push(result)
        self.current = old_token
        return result
1072066
function getTokens (string) {
  let tokens = null
  try { tokens = esprima.tokenize('`'+ string +'`') }
  catch (e) { tokens = [] }
  return tokens
}
831319
def parse(self):
        """"""
        expr = self.expression()
        if not isinstance(self.current_token, EndToken):
            raise InvalidTokenError("Unconsumed trailing tokens.")
        return expr
118350
def fetch(index, tokens):
    
    if len(tokens) == 0:
        return set()
    return set.intersection(*[set(index.get(token, [])) for token in tokens])
691366
def next(self):
        """"""
        if self.tokens:
            other = self.copy()
            tok = other.tokens.pop()
            other.tokens.append(tok.next())
            return other
        else:
            return Version.inf
1321777
def NextToken(self):
    """"""
    self._previous_line = self._line
    self._previous_column = self._column

    self._column += len(self.token)
    self._SkipWhitespace()

    if not self._more_lines:
      self.token = ''
      return

    match = self._TOKEN.match(self._current_line, self._column)
    if not match and not self._skip_comments:
      match = self._COMMENT.match(self._current_line, self._column)
    if match:
      token = match.group(0)
      self.token = token
    else:
      self.token = self._current_line[self._column]
242830
public function current()
    {
        if (!isset($this->tokens[$this->position])) {
            throw $this->getOutOfBoundsException();
        }

        return $this->tokens[$this->position];
    }
1338714
def _tokens_to_subtoken(self, tokens):
        
        ret = []
        for token in tokens:
            ret.extend(
                self._escaped_token_to_subtoken_strings(_escape_token(token, self._alphabet)))
        return ret
1205305
def split_token_in_parts(token):
    
    result = []
    current = []
    for part in token + (':', ):
        if part == ':':
            if current:
                result.append(tuple(current))
                current = []
        else:
            current.append(part)

    return result