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

18
LINES

< > BotCompany Repo | #1007997 // testLispEval

JavaX fragment (include)

1  
static void testLispEval(S concepts, S statements, S stuffToParse) {
2  
  useConceptsAndCLStatements(concepts, statements);
3  
  map(f testParse, toLinesFullTrim(stuffToParse));
4  
}
5  
6  
svoid testParse(S s) {
7  
  print("  Parsing: " + s);
8  
  Lisp l = hygienicParse1(s);
9  
  if (l != null) printIndent("Parsed as: " + l);
10  
  S result = null;
11  
  pcall {
12  
    if (l != null) result = str(eval(l));
13  
  }
14  
  printIndent(s + " = " + or(result, "?"));
15  
  print();
16  
}
17  
18  
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: 468 / 510
Referenced in: [show references]