backyard-parser 0.1.10

Parse PHP code to AST node.
Documentation
---
source: crates/backyard-parser/tests/types.rs
expression: asts
snapshot_kind: text
---
node_type: program
children:
  - node_type: class
    inheritance: ~
    name:
      node_type: identifier
      name:
        - 65
      loc:
        start:
          line: 1
          column: 6
          offset: 6
        end:
          line: 1
          column: 7
          offset: 7
      leadings: ~
      trailings: ~
    extends: ~
    implements: []
    body:
      node_type: block
      statements:
        - node_type: property
          visibilities:
            - Protected
          modifier: ~
          hooks: []
          items:
            - node_type: property_item
              name:
                node_type: identifier
                name:
                  - 99
                  - 117
                  - 114
                  - 114
                  - 101
                  - 110
                  - 116
                  - 72
                  - 97
                  - 110
                  - 100
                  - 108
                  - 101
                  - 114
                  - 50
                loc:
                  start:
                    line: 2
                    column: 30
                    offset: 40
                  end:
                    line: 2
                    column: 45
                    offset: 55
                leadings: ~
                trailings: ~
              variable_type:
                node_type: union_type
                types:
                  - node_type: intersection_type
                    types:
                      - node_type: union_type
                        types:
                          - node_type: type
                            is_nullable: false
                            name:
                              - 92
                              - 65
                            loc:
                              start:
                                line: 2
                                column: 14
                                offset: 24
                              end:
                                line: 2
                                column: 16
                                offset: 26
                            leadings: ~
                            trailings: ~
                          - node_type: type
                            is_nullable: false
                            name:
                              - 92
                              - 67
                            loc:
                              start:
                                line: 2
                                column: 17
                                offset: 27
                              end:
                                line: 2
                                column: 19
                                offset: 29
                            leadings: ~
                            trailings: ~
                        loc:
                          start:
                            line: 2
                            column: 14
                            offset: 24
                          end:
                            line: 2
                            column: 19
                            offset: 29
                        leadings: ~
                        trailings: ~
                      - node_type: type
                        is_nullable: false
                        name:
                          - 92
                          - 66
                        loc:
                          start:
                            line: 2
                            column: 21
                            offset: 31
                          end:
                            line: 2
                            column: 23
                            offset: 33
                        leadings: ~
                        trailings: ~
                    loc:
                      start:
                        line: 2
                        column: 14
                        offset: 24
                      end:
                        line: 2
                        column: 23
                        offset: 33
                    leadings: ~
                    trailings: ~
                  - node_type: type
                    is_nullable: false
                    name:
                      - 110
                      - 117
                      - 108
                      - 108
                    loc:
                      start:
                        line: 2
                        column: 25
                        offset: 35
                      end:
                        line: 2
                        column: 29
                        offset: 39
                    leadings: ~
                    trailings: ~
                loc:
                  start:
                    line: 2
                    column: 14
                    offset: 24
                  end:
                    line: 2
                    column: 29
                    offset: 39
                leadings: ~
                trailings: ~
              value: ~
              loc:
                start:
                  line: 2
                  column: 30
                  offset: 40
                end:
                  line: 2
                  column: 30
                  offset: 40
              leadings: ~
              trailings: ~
          loc:
            start:
              line: 2
              column: 2
              offset: 12
            end:
              line: 2
              column: 30
              offset: 40
          leadings: ~
          trailings: ~
      loc:
        start:
          line: 1
          column: 8
          offset: 8
        end:
          line: 3
          column: 0
          offset: 58
      leadings: ~
      trailings: ~
    is_readonly: false
    loc:
      start:
        line: 1
        column: 0
        offset: 0
      end:
        line: 3
        column: 0
        offset: 58
    leadings: ~
    trailings: ~
loc:
  start:
    line: 1
    column: 0
    offset: 0
  end:
    line: 3
    column: 0
    offset: 58
leadings: ~
trailings: ~