aboutsummaryrefslogtreecommitdiff
path: root/tools/tree-sitter/test/corpus/assign_record_to_base.txt
blob: f0d44c6ff771e828a097ffe9d596bf89fc13ae4c (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
54
55
56
57
==================
assign_record_to_base
==================

program()
type
  B = record
    x: Int
  end
  R = record(B)
    y: Int
  end

var
  x: ^B
  y: ^R

begin
  x := y
end.

---

(source_file
  (program_declaration
    (type_section
      (type_declaration
        (identifier_definition
          (identifier))
        (record_type
          (field_declaration
            (field_identifier
              (identifier))
            (identifier))))
      (type_declaration
        (identifier_definition
          (identifier))
        (record_type
          (identifier)
          (field_declaration
            (field_identifier
              (identifier))
            (identifier)))))
    (var_section
      (variable_declaration
        (identifier_definition
          (identifier))
        (pointer_type
          (identifier)))
      (variable_declaration
        (identifier_definition
          (identifier))
        (pointer_type
          (identifier))))
    (assignment_statement
      (identifier)
      (identifier))))