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

18
LINES

< > BotCompany Repo | #1007997 // testLispEval

JavaX fragment (include)

static void testLispEval(S concepts, S statements, S stuffToParse) {
  useConceptsAndCLStatements(concepts, statements);
  map(f testParse, toLinesFullTrim(stuffToParse));
}

svoid testParse(S s) {
  print("  Parsing: " + s);
  Lisp l = hygienicParse1(s);
  if (l != null) printIndent("Parsed as: " + l);
  S result = null;
  pcall {
    if (l != null) result = str(eval(l));
  }
  printIndent(s + " = " + or(result, "?"));
  print();
}

static O eval(Lisp l) { ret generalLispEval(l); }

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1007997
Snippet name: testLispEval
Eternal ID of this version: #1007997/1
Text MD5: 4cef6ef36cc427ab71fe61a9293a4071
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-04-18 04:08:24
Source code size: 504 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 380 / 383
Referenced in: [show references]