backyard-parser 0.1.10

Parse PHP code to AST node.
Documentation
---
source: crates/backyard-parser/tests/tries.rs
expression: asts
snapshot_kind: text
---
node_type: program
children:
  - node_type: try
    body:
      node_type: block
      statements:
        - node_type: throw
          statement:
            node_type: new
            statement:
              node_type: call
              name:
                node_type: identifier
                name:
                  - 69
                  - 114
                  - 114
                  - 111
                  - 114
                loc:
                  start:
                    line: 2
                    column: 12
                    offset: 18
                  end:
                    line: 2
                    column: 17
                    offset: 23
                leadings: ~
                trailings: ~
              arguments:
                - node_type: call_argument
                  name: ~
                  value:
                    node_type: string
                    quote: Double
                    value:
                      - 67
                      - 117
                      - 115
                      - 116
                      - 111
                      - 109
                      - 32
                      - 101
                      - 114
                      - 114
                      - 111
                      - 114
                      - 32
                      - 111
                      - 99
                      - 99
                      - 117
                      - 114
                      - 114
                      - 101
                      - 100
                    loc:
                      start:
                        line: 2
                        column: 18
                        offset: 24
                      end:
                        line: 2
                        column: 18
                        offset: 24
                    leadings: ~
                    trailings: ~
                  loc:
                    start:
                      line: 2
                      column: 18
                      offset: 24
                    end:
                      line: 2
                      column: 18
                      offset: 24
                  leadings: ~
                  trailings: ~
              loc:
                start:
                  line: 2
                  column: 17
                  offset: 23
                end:
                  line: 2
                  column: 41
                  offset: 47
              leadings: ~
              trailings: ~
            loc:
              start:
                line: 2
                column: 8
                offset: 14
              end:
                line: 2
                column: 41
                offset: 47
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 2
              column: 2
              offset: 8
            end:
              line: 2
              column: 41
              offset: 47
          leadings: ~
          trailings: ~
      loc:
        start:
          line: 1
          column: 4
          offset: 4
        end:
          line: 3
          column: 0
          offset: 50
      leadings: ~
      trailings: ~
    catches:
      - node_type: catch
        types:
          - node_type: identifier
            name:
              - 70
              - 111
              - 111
              - 69
              - 114
              - 114
              - 111
              - 114
            loc:
              start:
                line: 3
                column: 9
                offset: 59
              end:
                line: 3
                column: 17
                offset: 67
            leadings: ~
            trailings: ~
        variable:
          node_type: variable
          name:
            node_type: identifier
            name:
              - 101
              - 114
              - 114
            loc:
              start:
                line: 3
                column: 18
                offset: 68
              end:
                line: 3
                column: 21
                offset: 71
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 3
              column: 18
              offset: 68
            end:
              line: 3
              column: 21
              offset: 71
          leadings: ~
          trailings: ~
        body:
          node_type: block
          statements: []
          loc:
            start:
              line: 3
              column: 24
              offset: 74
            end:
              line: 4
              column: 0
              offset: 76
          leadings: ~
          trailings: ~
        loc:
          start:
            line: 3
            column: 2
            offset: 52
          end:
            line: 4
            column: 0
            offset: 76
        leadings: ~
        trailings: ~
      - node_type: catch
        types:
          - node_type: identifier
            name:
              - 70
              - 111
              - 111
              - 50
              - 69
              - 114
              - 114
              - 111
              - 114
            loc:
              start:
                line: 4
                column: 9
                offset: 85
              end:
                line: 4
                column: 18
                offset: 94
            leadings: ~
            trailings: ~
          - node_type: identifier
            name:
              - 66
              - 97
              - 114
              - 69
              - 114
              - 114
              - 111
              - 114
            loc:
              start:
                line: 4
                column: 21
                offset: 97
              end:
                line: 4
                column: 29
                offset: 105
            leadings: ~
            trailings: ~
        variable:
          node_type: variable
          name:
            node_type: identifier
            name:
              - 101
              - 114
              - 114
            loc:
              start:
                line: 4
                column: 30
                offset: 106
              end:
                line: 4
                column: 33
                offset: 109
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 4
              column: 30
              offset: 106
            end:
              line: 4
              column: 33
              offset: 109
          leadings: ~
          trailings: ~
        body:
          node_type: block
          statements: []
          loc:
            start:
              line: 4
              column: 36
              offset: 112
            end:
              line: 5
              column: 0
              offset: 114
          leadings: ~
          trailings: ~
        loc:
          start:
            line: 4
            column: 2
            offset: 78
          end:
            line: 5
            column: 0
            offset: 114
        leadings: ~
        trailings: ~
      - node_type: finally
        body:
          node_type: block
          statements: []
          loc:
            start:
              line: 5
              column: 10
              offset: 124
            end:
              line: 6
              column: 0
              offset: 126
          leadings: ~
          trailings: ~
        loc:
          start:
            line: 5
            column: 2
            offset: 116
          end:
            line: 6
            column: 0
            offset: 126
        leadings: ~
        trailings: ~
    loc:
      start:
        line: 1
        column: 0
        offset: 0
      end:
        line: 6
        column: 0
        offset: 126
    leadings: ~
    trailings: ~
loc:
  start:
    line: 1
    column: 0
    offset: 0
  end:
    line: 6
    column: 0
    offset: 126
leadings: ~
trailings: ~