Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1028588 // pwt_precedingTokens

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2890L/18K).

1  
static ItIt<ParsedWithTokens<S>> pwt_precedingTokens(int minTokens, int maxTokens, ListAndIndex<S> tok) {
2  
  int remaining = countPrecedingTokens(tok);
3  
  int iStart = tok.idx;
4  
  ret countIterator_inclusive(
5  
    min(minTokens, remaining),
6  
    min(maxTokens, remaining),
7  
    n -> pwt_raw(tok.list, iStart-n*2, iStart-1));
8  
}

Author comment

Began life as a copy of #1028572

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028588
Snippet name: pwt_precedingTokens
Eternal ID of this version: #1028588/1
Text MD5: 00701078409d5154b5a3768db6ec3ae3
Transpilation MD5: 7e0edec757bb97897f4ff80fc6720689
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-06-27 22:03:51
Source code size: 327 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 286 / 469
Referenced in: [show references]