summary refs log tree commit diff stats
path: root/examples/unix_socket/server.nim
diff options
context:
space:
mode:
authorHans Raaf <hara@oderwat.de>2016-05-11 22:51:27 +0200
committerHans Raaf <hara@oderwat.de>2016-05-11 22:51:27 +0200
commitd3bae50c3ca2bf38235bbc33f3f08ffa0f8e9a15 (patch)
tree260b575727cc6dfbbe25f07a173152563fcb7712 /examples/unix_socket/server.nim
parentb654aa399acf8e935bc83d58d74f2269b74f36b7 (diff)
downloadNim-d3bae50c3ca2bf38235bbc33f3f08ffa0f8e9a15.tar.gz
PHP codegen array constructor hack.
Because of PHP can't have refs for literal function parameters I
needed to come up with a hack such that the following code compiles with
PHP target.

```nim
type Foo = tuple[a: string, b: int]

var foo: array [0..2, Foo]

foo[0] = ("Test", 1)
foo[1] = ("Me", 2)

for x in foo:
  echo x.a
  echo x.b
```
Diffstat (limited to 'examples/unix_socket/server.nim')
0 files changed, 0 insertions, 0 deletions
h=hlt&id=8eec3eae35d3961a65b1ced4313ca00a0e32e55e'>8eec3eae ^
c48ce3c8 ^
8eec3eae ^

7c2ac5dc ^

fee1bbd8 ^
3a558d22 ^
c48ce3c8 ^
d5171ad7 ^
7c2ac5dc ^


fee1bbd8 ^
8eec3eae ^

ea62afb1 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56