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:
            - Private
          modifier: ~
          hooks: []
          items:
            - node_type: property_item
              name:
                node_type: identifier
                name:
                  - 115
                  - 117
                  - 103
                  - 103
                  - 101
                  - 115
                  - 116
                  - 101
                  - 100
                  - 86
                  - 97
                  - 108
                  - 117
                  - 101
                  - 115
                loc:
                  start:
                    line: 2
                    column: 25
                    offset: 35
                  end:
                    line: 2
                    column: 40
                    offset: 50
                leadings: ~
                trailings: ~
              variable_type:
                node_type: union_type
                types:
                  - node_type: type
                    is_nullable: false
                    name:
                      - 97
                      - 114
                      - 114
                      - 97
                      - 121
                    loc:
                      start:
                        line: 2
                        column: 10
                        offset: 20
                      end:
                        line: 2
                        column: 15
                        offset: 25
                    leadings: ~
                    trailings: ~
                  - node_type: type
                    is_nullable: false
                    name:
                      - 92
                      - 67
                      - 108
                      - 111
                      - 115
                      - 117
                      - 114
                      - 101
                    loc:
                      start:
                        line: 2
                        column: 16
                        offset: 26
                      end:
                        line: 2
                        column: 24
                        offset: 34
                    leadings: ~
                    trailings: ~
                loc:
                  start:
                    line: 2
                    column: 10
                    offset: 20
                  end:
                    line: 2
                    column: 24
                    offset: 34
                leadings: ~
                trailings: ~
              value:
                node_type: array
                is_short: true
                items: []
                loc:
                  start:
                    line: 2
                    column: 44
                    offset: 54
                  end:
                    line: 2
                    column: 45
                    offset: 55
                leadings: ~
                trailings: ~
              loc:
                start:
                  line: 2
                  column: 25
                  offset: 35
                end:
                  line: 2
                  column: 45
                  offset: 55
              leadings: ~
              trailings: ~
          loc:
            start:
              line: 2
              column: 2
              offset: 12
            end:
              line: 2
              column: 45
              offset: 55
          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: ~