backyard-parser 0.1.10

Parse PHP code to AST node.
Documentation
---
source: crates/backyard-parser/tests/interface.rs
expression: asts
snapshot_kind: text
---
node_type: program
children:
  - node_type: interface
    name:
      node_type: identifier
      name:
        - 65
      loc:
        start:
          line: 1
          column: 10
          offset: 10
        end:
          line: 1
          column: 11
          offset: 11
      leadings: ~
      trailings: ~
    extends:
      - node_type: identifier
        name:
          - 66
        loc:
          start:
            line: 1
            column: 20
            offset: 20
          end:
            line: 1
            column: 21
            offset: 21
        leadings: ~
        trailings: ~
      - node_type: identifier
        name:
          - 67
        loc:
          start:
            line: 1
            column: 23
            offset: 23
          end:
            line: 1
            column: 24
            offset: 24
        leadings: ~
        trailings: ~
    body:
      node_type: block
      statements:
        - node_type: const_property
          const_type: ~
          visibilities: []
          items:
            - node_type: assignment
              left:
                node_type: identifier
                name:
                  - 77
                  - 89
                  - 95
                  - 67
                  - 79
                  - 78
                  - 83
                  - 84
                  - 65
                  - 78
                  - 84
                loc:
                  start:
                    line: 2
                    column: 8
                    offset: 35
                  end:
                    line: 2
                    column: 19
                    offset: 46
                leadings: ~
                trailings: ~
              operator: Default
              right:
                node_type: string
                quote: Double
                value:
                  - 99
                  - 111
                  - 110
                  - 115
                  - 116
                  - 97
                  - 110
                  - 116
                  - 32
                  - 118
                  - 97
                  - 108
                  - 117
                  - 101
                loc:
                  start:
                    line: 2
                    column: 22
                    offset: 49
                  end:
                    line: 2
                    column: 22
                    offset: 49
                leadings: ~
                trailings: ~
              loc:
                start:
                  line: 2
                  column: 20
                  offset: 47
                end:
                  line: 2
                  column: 22
                  offset: 49
              leadings: ~
              trailings: ~
          loc:
            start:
              line: 2
              column: 2
              offset: 29
            end:
              line: 2
              column: 22
              offset: 49
          leadings: ~
          trailings: ~
        - node_type: method
          visibility: Public
          inheritance: ~
          is_static: false
          function:
            node_type: function
            is_ref: false
            name:
              node_type: identifier
              name:
                - 97
              loc:
                start:
                  line: 3
                  column: 18
                  offset: 85
                end:
                  line: 3
                  column: 19
                  offset: 86
              leadings: ~
              trailings: ~
            parameters:
              - node_type: parameter
                variable_type:
                  node_type: type
                  is_nullable: false
                  name:
                    - 105
                    - 110
                    - 116
                  loc:
                    start:
                      line: 3
                      column: 20
                      offset: 87
                    end:
                      line: 3
                      column: 23
                      offset: 90
                  leadings: ~
                  trailings: ~
                is_ref: false
                is_ellipsis: false
                name:
                  node_type: identifier
                  name:
                    - 120
                  loc:
                    start:
                      line: 3
                      column: 24
                      offset: 91
                    end:
                      line: 3
                      column: 25
                      offset: 92
                  leadings: ~
                  trailings: ~
                value: ~
                loc:
                  start:
                    line: 3
                    column: 20
                    offset: 87
                  end:
                    line: 3
                    column: 24
                    offset: 91
                leadings: ~
                trailings: ~
              - node_type: parameter
                variable_type:
                  node_type: type
                  is_nullable: false
                  name:
                    - 105
                    - 110
                    - 116
                  loc:
                    start:
                      line: 3
                      column: 28
                      offset: 95
                    end:
                      line: 3
                      column: 31
                      offset: 98
                  leadings: ~
                  trailings: ~
                is_ref: false
                is_ellipsis: false
                name:
                  node_type: identifier
                  name:
                    - 121
                  loc:
                    start:
                      line: 3
                      column: 32
                      offset: 99
                    end:
                      line: 3
                      column: 33
                      offset: 100
                  leadings: ~
                  trailings: ~
                value:
                  node_type: number
                  value:
                    - 48
                  loc:
                    start:
                      line: 3
                      column: 37
                      offset: 104
                    end:
                      line: 3
                      column: 37
                      offset: 104
                  leadings: ~
                  trailings: ~
                loc:
                  start:
                    line: 3
                    column: 28
                    offset: 95
                  end:
                    line: 3
                    column: 37
                    offset: 104
                leadings: ~
                trailings: ~
            return_type:
              node_type: type
              is_nullable: false
              name:
                - 105
                - 110
                - 116
              loc:
                start:
                  line: 3
                  column: 41
                  offset: 108
                end:
                  line: 3
                  column: 44
                  offset: 111
              leadings: ~
              trailings: ~
            body: ~
            loc:
              start:
                line: 3
                column: 9
                offset: 76
              end:
                line: 3
                column: 41
                offset: 108
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 3
              column: 2
              offset: 69
            end:
              line: 3
              column: 41
              offset: 108
          leadings: ~
          trailings: ~
      loc:
        start:
          line: 1
          column: 25
          offset: 25
        end:
          line: 4
          column: 0
          offset: 113
      leadings: ~
      trailings: ~
    loc:
      start:
        line: 1
        column: 0
        offset: 0
      end:
        line: 4
        column: 0
        offset: 113
    leadings: ~
    trailings: ~
loc:
  start:
    line: 1
    column: 0
    offset: 0
  end:
    line: 4
    column: 0
    offset: 113
leadings: ~
trailings: ~