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).

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

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: 158 / 251
Version history: 4 change(s)
Referenced in: [show references]