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

19
LINES

< > BotCompany Repo | #1025448 // Propositions to objects, step 6 - parsing (shortened)

JavaX source code (desktop) [tags: use-pretranspiled] - run with: x30.jar

Download Jar. Libraryless. Click here for Pure Java version (8088L/56K).

1  
!7
2  
3  
static withToList record Did$HappenBefore$(O event1, O event2) {}
4  
static withToList record WhenDid$Happen(O event) {}
5  
static withToList record $HappensAtSecond$(O event, O y) {}
6  
7  
static ClassesAndPatterns classes;
8  
sO parseArg(S s) { ret isInteger(s) ? parseInt(s) : s; }
9  
sO parse(S s) { ret classes.parse(s, a -> parseArg(a)); }
10  
11  
p-exp {
12  
  classes = new ClassesAndPatterns(myRecordClasses(), mc());
13  
  pnl(classes.entries);
14  
  testFunctionValues parse(
15  
    "Did X happen before Y?" := Did$HappenBefore$("X", "Y"),
16  
    "when did Z happen" := WhenDid$Happen("Z"),
17  
    "{event 1} happens at second 100" := $HappensAtSecond$("event 1", 100)
18  
  );
19  
}

Author comment

Began life as a copy of #1025442

download  show line numbers  debug dex  old transpilations   

Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1025448
Snippet name: Propositions to objects, step 6 - parsing (shortened)
Eternal ID of this version: #1025448/6
Text MD5: 401a0582e96db137233367e56e0109cf
Transpilation MD5: 4b939fd1555545ca4794ce871fbc7d18
Author: stefan
Category: javax / a.i.
Type: JavaX source code (desktop)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-29 01:15:31
Source code size: 663 bytes / 19 lines
Pitched / IR pitched: No / No
Views / Downloads: 316 / 947
Version history: 5 change(s)
Referenced in: [show references]