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

8
LINES

< > BotCompany Repo | #1037253 // tok_findFunctionCall

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

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

// token range is from function name to closing bracket+1
static TokenRange tok_findFunctionCall(LS tok, S functionName) {
  int idx = jfind(tok, contains(functionName, "(") ? functionName : functionName + "(");
  if (idx < 0) null;
  int iOpening = indexOf(tok, "(", idx);
  int iEnd = findEndOfBracketPart(tok, iOpening);
  ret new TokenRange(idx, iEnd);
}

Author comment

Began life as a copy of #1031419

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1037253
Snippet name: tok_findFunctionCall
Eternal ID of this version: #1037253/6
Text MD5: 50b6e1633e2d1013b572ce52149284f9
Transpilation MD5: 0876bce55b80bd8565cb00b81ad4dc0a
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-12-12 19:22:26
Source code size: 365 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 127 / 183
Version history: 5 change(s)
Referenced in: [show references]