annotate src/requests.tp @ 17:566960135ea1

Small bit of cleanup now that the string escaping bug is fixed.
author Mike Pavone <pavone@retrodev.com>
date Fri, 09 Aug 2013 04:31:14 -0700
parents cb5108f62f93
children a0e66161bde0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10
79c1db5e7ebd sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff changeset
1 #{
14
0cf665278240 commit for bugfix
William Morgan <bill@mrgn.org>
parents: 13
diff changeset
2 evalRequest <- :args {
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
3 #{
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
4 id <- "a"
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
5 arguments <- args
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
6 string <- {
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
7 temp <- ""//arguments fold: "" with: :acc el {acc . el}
14
0cf665278240 commit for bugfix
William Morgan <bill@mrgn.org>
parents: 13
diff changeset
8 "id" . id . "arguments" . temp
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
9 }
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
10 }
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
11 }
10
79c1db5e7ebd sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff changeset
12
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
13 guessRequest <- :id :prog {
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
14 #{
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
15 string <- {
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
16 //remove the second escaped quote, it will compile.
17
566960135ea1 Small bit of cleanup now that the string escaping bug is fixed.
Mike Pavone <pavone@retrodev.com>
parents: 16
diff changeset
17 idStr <- "\"id\":\"" . id . "\""
566960135ea1 Small bit of cleanup now that the string escaping bug is fixed.
Mike Pavone <pavone@retrodev.com>
parents: 16
diff changeset
18 progStr <- "\"program\":\"" . prog . "\""
566960135ea1 Small bit of cleanup now that the string escaping bug is fixed.
Mike Pavone <pavone@retrodev.com>
parents: 16
diff changeset
19 "{" . idStr . "," . progStr . "}"
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
20 }
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
21 }
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
22 }
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
23
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
24 main <- {
15
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
25 //print: ((evalRequest: #[1 2 3]) string)
18ec9131f594 one more compiler bug for mike.
William Morgan <bill@mrgn.org>
parents: 14
diff changeset
26 print: ((guessRequest: "someId" "someProg") string) . "\n"
12
7d8b8f82cbef Help Bill work around some compiler bugs
Mike Pavone <pavone@retrodev.com>
parents: 10
diff changeset
27 }
10
79c1db5e7ebd sending broken file for mike to check error
William Morgan <bill@mrgn.org>
parents:
diff changeset
28 }