aboutsummaryrefslogtreecommitdiff
path: root/tools/tree-sitter/test/corpus/generic_export.txt
blob: 52e767e8b3045238ddb86f01e9e735ed835964ff (plain)
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
==================
generic_export
==================

module

type
  Stack#[T]* = record
    item: ^T
  end

proc push#[T]*(s: ^Stack#[T]; item: ^T)
return

end.

---

(source_file
  (module_declaration
    (type_section
      (type_declaration
        (identifier_definition
          (identifier)
          (type_parameters
            (identifier)))
        (record_type
          (field_declaration
            (field_identifier
              (identifier))
            (pointer_type
              (identifier))))))
    (procedure_declaration
      (identifier_definition
        (identifier)
        (type_parameters
          (identifier)))
      (parameter_list
        (field_declaration
          (field_identifier
            (identifier))
          (pointer_type
            (generic_type
              (identifier)
              (type_arguments
                (identifier)))))
        (field_declaration
          (field_identifier
            (identifier))
          (pointer_type
            (identifier))))
      (procedure_body
        (return_clause)))))