backyard-parser 0.1.10

Parse PHP code to AST node.
Documentation
---
source: crates/backyard-parser/tests/switch.rs
expression: asts
snapshot_kind: text
---
node_type: program
children:
  - node_type: switch
    condition:
      node_type: variable
      name:
        node_type: identifier
        name:
          - 97
        loc:
          start:
            line: 1
            column: 8
            offset: 8
          end:
            line: 1
            column: 9
            offset: 9
        leadings: ~
        trailings: ~
      loc:
        start:
          line: 1
          column: 8
          offset: 8
        end:
          line: 1
          column: 9
          offset: 9
      leadings: ~
      trailings: ~
    body:
      node_type: block
      statements:
        - node_type: case
          condition:
            node_type: number
            value:
              - 49
            loc:
              start:
                line: 2
                column: 7
                offset: 20
              end:
                line: 2
                column: 7
                offset: 20
            leadings: ~
            trailings: ~
          body:
            node_type: block
            statements:
              - node_type: break
                statement: ~
                loc:
                  start:
                    line: 3
                    column: 4
                    offset: 27
                  end:
                    line: 3
                    column: 4
                    offset: 27
                leadings: ~
                trailings: ~
            loc:
              start:
                line: 3
                column: 4
                offset: 27
              end:
                line: 3
                column: 9
                offset: 32
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 2
              column: 2
              offset: 15
            end:
              line: 3
              column: 9
              offset: 32
          leadings: ~
          trailings: ~
        - node_type: case
          condition:
            node_type: number
            value:
              - 50
            loc:
              start:
                line: 4
                column: 7
                offset: 41
              end:
                line: 4
                column: 7
                offset: 41
            leadings: ~
            trailings: ~
          body:
            node_type: block
            statements:
              - node_type: return
                statement: ~
                loc:
                  start:
                    line: 5
                    column: 4
                    offset: 48
                  end:
                    line: 5
                    column: 4
                    offset: 48
                leadings: ~
                trailings: ~
            loc:
              start:
                line: 5
                column: 4
                offset: 48
              end:
                line: 5
                column: 10
                offset: 54
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 4
              column: 2
              offset: 36
            end:
              line: 5
              column: 10
              offset: 54
          leadings: ~
          trailings: ~
        - node_type: case
          condition: ~
          body:
            node_type: block
            statements:
              - node_type: continue
                statement: ~
                loc:
                  start:
                    line: 7
                    column: 4
                    offset: 71
                  end:
                    line: 7
                    column: 4
                    offset: 71
                leadings: ~
                trailings: ~
            loc:
              start:
                line: 7
                column: 4
                offset: 71
              end:
                line: 7
                column: 12
                offset: 79
            leadings: ~
            trailings: ~
          loc:
            start:
              line: 6
              column: 2
              offset: 58
            end:
              line: 7
              column: 12
              offset: 79
          leadings: ~
          trailings: ~
      loc:
        start:
          line: 1
          column: 11
          offset: 11
        end:
          line: 8
          column: 0
          offset: 81
      leadings: ~
      trailings: ~
    is_short: true
    loc:
      start:
        line: 1
        column: 0
        offset: 0
      end:
        line: 8
        column: 0
        offset: 81
    leadings: ~
    trailings: ~
loc:
  start:
    line: 1
    column: 0
    offset: 0
  end:
    line: 8
    column: 9
    offset: 90
leadings: ~
trailings: ~