~mna/snow unlisted

snow/pkg/parser/testdata/generics.snow.want -rw-r--r-- 2.0 KiB
424066c5Martin Angers doc: v0.0.5 1 year, 5 months ago
                                                                                
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
file [3, #0] [0:225]
  fn [0:83]
    ident [max] [3:6]
    generic [7:11]
      param [8:10]
        ident [$T] [8:10]
    sig [2->1] [12:34]
      param [13:20]
        ident [v1] [13:15]
        ident [$T] [17:19]
      param [21:27]
        ident [v2] [21:23]
        ident [$T] [25:27]
      ident [$T] [32:34]
    block [2] [35:83]
      if [1] [39:69]
        item [42:49]
          binary [>] [42:49]
            ident [v1] [42:44]
            ident [v2] [47:49]
        block [1] [50:69]
          return [56:65]
            ident [v1] [63:65]
      return [72:81]
        ident [v2] [79:81]
  struct [2] [85:133]
    ident [S] [92:93]
    generic [94:102]
      param [95:98]
        ident [$T] [95:97]
      param [99:101]
        ident [$U] [99:101]
    var [107:117]
      tt: [111:117]
        ident [tt] [111:113]
        ident [$T] [115:117]
    let [121:131]
      uu: [125:131]
        ident [uu] [125:127]
        ident [$U] [129:131]
  fn [135:225]
    ident [main] [138:142]
    sig [0->0] [142:144]
    block [2] [145:225]
      let [149:176]
        z:= [153:176]
          ident [z] [153:154]
          ident [int] [156:159]
          call [2] [162:176]
            generic ident [162:170]
              ident [max] [162:165]
              generic [165:170]
                param [166:169]
                  ident [int] [166:169]
            item [171:173]
              int [1] [171:172]
            item [174:175]
              int [2] [174:175]
      let [179:223]
        s= [183:223]
          ident [s] [183:184]
          call [2] [187:223]
            generic ident [187:204]
              ident [S] [187:188]
              generic [189:204]
                param [190:197]
                  ident [string] [190:196]
                param [198:202]
                  ident [bool] [198:202]
            item: [205:213]
              ident [tt] [205:207]
              string ["a"] [209:212]
            item: [214:222]
              ident [uu] [214:216]
              ident [true] [218:222]