test updates woooo
This commit is contained in:
145
tests/sprint1/expected/sp1_real_alpha_file1.tok.exp
Normal file
145
tests/sprint1/expected/sp1_real_alpha_file1.tok.exp
Normal file
@ -0,0 +1,145 @@
|
||||
1 1 405 "type"
|
||||
1 6 101 "rec"
|
||||
1 9 508 ":"
|
||||
1 11 503 "["
|
||||
1 12 201 "integer"
|
||||
1 19 508 ":"
|
||||
1 21 101 "x"
|
||||
1 22 507 ";"
|
||||
1 24 201 "integer"
|
||||
1 31 508 ":"
|
||||
1 33 101 "y"
|
||||
1 34 504 "]"
|
||||
2 1 405 "type"
|
||||
2 6 101 "T1"
|
||||
2 8 508 ":"
|
||||
2 10 201 "integer"
|
||||
2 18 510 "->"
|
||||
2 21 201 "integer"
|
||||
3 1 405 "type"
|
||||
3 6 101 "T2"
|
||||
3 8 508 ":"
|
||||
3 10 101 "rec"
|
||||
3 14 510 "->"
|
||||
3 17 201 "integer"
|
||||
4 1 406 "function"
|
||||
4 10 101 "foo"
|
||||
4 14 508 ":"
|
||||
4 16 101 "T1"
|
||||
5 1 406 "function"
|
||||
5 10 101 "bar1"
|
||||
5 15 508 ":"
|
||||
5 17 101 "T2"
|
||||
6 1 406 "function"
|
||||
6 10 101 "bar2"
|
||||
6 15 508 ":"
|
||||
6 17 101 "T2"
|
||||
7 1 101 "foo"
|
||||
7 4 501 "("
|
||||
7 5 101 "x"
|
||||
7 6 502 ")"
|
||||
7 8 608 ":="
|
||||
7 11 505 "{"
|
||||
8 2 407 "return"
|
||||
8 9 101 "x"
|
||||
8 11 603 "*"
|
||||
8 13 101 "x"
|
||||
8 14 507 ";"
|
||||
9 9 506 "}"
|
||||
10 1 101 "bar1"
|
||||
10 5 501 "("
|
||||
10 6 101 "a"
|
||||
10 7 502 ")"
|
||||
10 9 608 ":="
|
||||
10 12 505 "{"
|
||||
11 9 407 "return"
|
||||
11 16 101 "a"
|
||||
11 17 612 "."
|
||||
11 18 101 "x"
|
||||
11 20 603 "*"
|
||||
11 22 101 "a"
|
||||
11 23 612 "."
|
||||
11 24 101 "y"
|
||||
11 25 507 ";"
|
||||
12 9 506 "}"
|
||||
13 1 101 "bar2"
|
||||
13 6 409 "as"
|
||||
13 9 501 "("
|
||||
13 10 101 "r"
|
||||
13 11 509 ","
|
||||
13 12 101 "s"
|
||||
13 13 502 ")"
|
||||
13 15 608 ":="
|
||||
13 18 505 "{"
|
||||
14 9 407 "return"
|
||||
14 16 101 "r"
|
||||
14 18 603 "*"
|
||||
14 20 101 "s"
|
||||
14 21 507 ";"
|
||||
15 9 506 "}"
|
||||
16 1 101 "entry"
|
||||
16 6 501 "("
|
||||
16 7 101 "arg"
|
||||
16 10 502 ")"
|
||||
16 12 608 ":="
|
||||
16 15 505 "{"
|
||||
17 9 503 "["
|
||||
17 11 201 "integer"
|
||||
17 18 508 ":"
|
||||
17 20 101 "result"
|
||||
17 27 507 ";"
|
||||
17 29 101 "rec"
|
||||
17 32 508 ":"
|
||||
17 34 101 "w"
|
||||
17 35 504 "]"
|
||||
18 9 101 "result"
|
||||
18 16 608 ":="
|
||||
18 19 101 "foo"
|
||||
18 22 501 "("
|
||||
18 23 301 "5"
|
||||
18 24 502 ")"
|
||||
18 25 507 ";"
|
||||
19 9 101 "w"
|
||||
19 11 608 ":="
|
||||
19 14 613 "reserve"
|
||||
19 21 501 "("
|
||||
19 22 101 "w"
|
||||
19 23 502 ")"
|
||||
19 24 507 ";"
|
||||
19 26 700 "(* see types.alpha – reserve returns a value of type address,
|
||||
which can be assigned to array and record variables
|
||||
*)"
|
||||
22 9 101 "w"
|
||||
22 10 612 "."
|
||||
22 11 101 "x"
|
||||
22 13 608 ":="
|
||||
22 16 301 "5"
|
||||
22 17 507 ";"
|
||||
23 9 101 "w"
|
||||
23 10 612 "."
|
||||
23 11 101 "y"
|
||||
23 13 608 ":="
|
||||
23 16 301 "7"
|
||||
23 17 507 ";"
|
||||
24 9 101 "result"
|
||||
24 16 608 ":="
|
||||
24 19 101 "bar1"
|
||||
24 23 501 "("
|
||||
24 24 101 "w"
|
||||
24 25 502 ")"
|
||||
24 26 507 ";"
|
||||
24 28 700 "(* pass w (a rec type value) to bar1 *)"
|
||||
25 9 101 "result"
|
||||
25 16 608 ":="
|
||||
25 19 101 "bar2"
|
||||
25 23 501 "("
|
||||
25 24 301 "5"
|
||||
25 25 509 ","
|
||||
25 26 301 "7"
|
||||
25 27 502 ")"
|
||||
25 28 507 ";"
|
||||
25 30 700 "(* implicitly build a rec type value, assign 5 and 7 to fields x and y, but call them r and s *)"
|
||||
27 9 407 "return"
|
||||
27 16 301 "0"
|
||||
27 17 507 ";"
|
||||
28 1 506 "}"
|
Reference in New Issue
Block a user