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

14
LINES

< > BotCompany Repo | #1037255 // dropFunctionCalls_reTok

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

Libraryless. Click here for Pure Java version (11546L/64K).

1  
// returns number of calls removed
2  
// functionName can also contain first arguments, e.g. "bla(a, b"
3  
static int dropFunctionCalls_reTok(LS tok, S functionName) {
4  
  int removed = 0;
5  
  while true {
6  
    var r = tok_findFunctionCall(tok, functionName);
7  
    if (r != null) {
8  
      clearTokens_reTok(tok, r);
9  
      ++removed;
10  
    } else
11  
      break;
12  
  }
13  
  ret removed;
14  
}

Author comment

Began life as a copy of #1037253

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1037255
Snippet name: dropFunctionCalls_reTok
Eternal ID of this version: #1037255/4
Text MD5: 107b6fa5af766189b5e4968ae0c23636
Transpilation MD5: 8e42bb23604b605fb3df50eaba3b8846
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2025-04-28 18:14:24
Source code size: 377 bytes / 14 lines
Pitched / IR pitched: No / No
Views / Downloads: 510 / 675
Version history: 3 change(s)
Referenced in: [show references]