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

10
LINES

< > BotCompany Repo | #1027889 // forWhereParseSimpleFunctionCall

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

Libraryless. Click here for Pure Java version (2926L/19K).

1  
// returns pair(var, function name)
2  
// e.g. for ForWhere(formatFrag("$x"), formatFrag("hasWord($x)"), ...)
3  
static Pair forWhereParseSimpleFunctionCall(ForWhere fw, DeepZipTools tools) {
4  
  if (fw != null && tools.isVar(fw.var) && fw.condition instanceof FunctionCall) {
5  
    FunctionCall fc = cast fw.condition;
6  
    if (eq(fc.args(), ll(fw.var)))
7  
      ret pair(fw.var, fc.function);
8  
  }
9  
  null;
10  
}

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: #1027889
Snippet name: forWhereParseSimpleFunctionCall
Eternal ID of this version: #1027889/5
Text MD5: a8e76f873f27cd7626415212793fd345
Transpilation MD5: 3e661cbdd758afe755bd65089fdfb4df
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-04-16 16:38:24
Source code size: 404 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 218 / 330
Version history: 4 change(s)
Referenced in: [show references]