rascal 0.3.4

A parser and compiler for Flash ActionScript 2 files into SWFs
Documentation
---
source: crates/rascal/src/program.rs
expression: parsed
input_file: samples/as2/nested_break_continue.as
---
Ok:
  initial_script:
    - ForIn:
        condition:
          Classic:
            initialize:
              Declare:
                name:
                  span:
                    start: 9
                    end: 10
                    file: 0
                  value: i
                value:
                  span:
                    start: 13
                    end: 14
                    file: 0
                  value:
                    Constant:
                      Integer: 0
                type_name: ~
            condition:
              - span:
                  start: 16
                  end: 21
                  file: 0
                value:
                  BinaryOperator:
                    - LessThan
                    - span:
                        start: 16
                        end: 17
                        file: 0
                      value:
                        Constant:
                          Identifier: i
                    - span:
                        start: 20
                        end: 21
                        file: 0
                      value:
                        Constant:
                          Integer: 4
            update:
              - span:
                  start: 24
                  end: 26
                  file: 0
                value:
                  UnaryOperator:
                    - Increment: Postfix
                    - span:
                        start: 23
                        end: 24
                        file: 0
                      value:
                        Constant:
                          Identifier: i
        body:
          Block:
            - Expr:
                span:
                  start: 31
                  end: 48
                  file: 0
                value:
                  Trace:
                    span:
                      start: 37
                      end: 47
                      file: 0
                    value:
                      BinaryOperator:
                        - Add
                        - span:
                            start: 37
                            end: 43
                            file: 0
                          value:
                            Constant:
                              String: "i = "
                        - span:
                            start: 46
                            end: 47
                            file: 0
                          value:
                            Constant:
                              Identifier: i
            - ForIn:
                condition:
                  Classic:
                    initialize:
                      Declare:
                        name:
                          span:
                            start: 60
                            end: 61
                            file: 0
                          value: j
                        value:
                          span:
                            start: 64
                            end: 65
                            file: 0
                          value:
                            Constant:
                              Integer: 0
                        type_name: ~
                    condition:
                      - span:
                          start: 67
                          end: 72
                          file: 0
                        value:
                          BinaryOperator:
                            - LessThan
                            - span:
                                start: 67
                                end: 68
                                file: 0
                              value:
                                Constant:
                                  Identifier: j
                            - span:
                                start: 71
                                end: 72
                                file: 0
                              value:
                                Constant:
                                  Integer: 4
                    update:
                      - span:
                          start: 75
                          end: 77
                          file: 0
                        value:
                          UnaryOperator:
                            - Increment: Postfix
                            - span:
                                start: 74
                                end: 75
                                file: 0
                              value:
                                Constant:
                                  Identifier: j
                body:
                  Block:
                    - Declare:
                        name:
                          span:
                            start: 87
                            end: 89
                            file: 0
                          value: fn
                        value:
                          span:
                            start: 92
                            end: 155
                            file: 0
                          value:
                            Function:
                              signature:
                                name: ~
                                args: []
                                return_type: ~
                              body:
                                - Expr:
                                    span:
                                      start: 108
                                      end: 140
                                      file: 0
                                    value:
                                      Trace:
                                        span:
                                          start: 114
                                          end: 139
                                          file: 0
                                        value:
                                          Constant:
                                            String: trying to break from fn
                                - Break
                              scope:
                                defined_variables:
                                  this:
                                    used: false
                                    used_in_inner_scope: false
                                    type_name: ~
                                  arguments:
                                    used: false
                                    used_in_inner_scope: false
                                    type_name: ~
                                  super:
                                    used: false
                                    used_in_inner_scope: false
                                    type_name: ~
                                  _root:
                                    used: false
                                    used_in_inner_scope: false
                                    type_name: ~
                                  _parent:
                                    used: false
                                    used_in_inner_scope: false
                                    type_name: ~
                                  _global:
                                    used: false
                                    used_in_inner_scope: false
                                    type_name: ~
                                referenced_variables: []
                                could_reference_anything: false
                              register_count: 1
                              preload_this: false
                              suppress_this: true
                              preload_arguments: false
                              suppress_arguments: true
                              preload_super: false
                              suppress_super: true
                              preload_root: false
                              preload_parent: false
                              preload_global: false
                        type_name: ~
                    - Expr:
                        span:
                          start: 158
                          end: 175
                          file: 0
                        value:
                          Trace:
                            span:
                              start: 164
                              end: 174
                              file: 0
                            value:
                              BinaryOperator:
                                - Add
                                - span:
                                    start: 164
                                    end: 170
                                    file: 0
                                  value:
                                    Constant:
                                      String: "j = "
                                - span:
                                    start: 173
                                    end: 174
                                    file: 0
                                  value:
                                    Constant:
                                      Identifier: j
                    - If:
                        condition:
                          span:
                            start: 183
                            end: 189
                            file: 0
                          value:
                            BinaryOperator:
                              - Equal
                              - span:
                                  start: 183
                                  end: 184
                                  file: 0
                                value:
                                  Constant:
                                    Identifier: j
                              - span:
                                  start: 188
                                  end: 189
                                  file: 0
                                value:
                                  Constant:
                                    Integer: 1
                        "yes":
                          Block:
                            - Expr:
                                span:
                                  start: 196
                                  end: 200
                                  file: 0
                                value:
                                  Call:
                                    name:
                                      span:
                                        start: 196
                                        end: 198
                                        file: 0
                                      value:
                                        Constant:
                                          Identifier: fn
                                    args: []
                            - Continue
                        "no": ~
                    - If:
                        condition:
                          span:
                            start: 225
                            end: 231
                            file: 0
                          value:
                            BinaryOperator:
                              - Equal
                              - span:
                                  start: 225
                                  end: 226
                                  file: 0
                                value:
                                  Constant:
                                    Identifier: j
                              - span:
                                  start: 230
                                  end: 231
                                  file: 0
                                value:
                                  Constant:
                                    Integer: 2
                        "yes":
                          Block:
                            - Break
                        "no": ~
            - If:
                condition:
                  span:
                    start: 257
                    end: 263
                    file: 0
                  value:
                    BinaryOperator:
                      - Equal
                      - span:
                          start: 257
                          end: 258
                          file: 0
                        value:
                          Constant:
                            Identifier: i
                      - span:
                          start: 262
                          end: 263
                          file: 0
                        value:
                          Constant:
                            Integer: 1
                "yes":
                  Block:
                    - Continue
                "no": ~
            - If:
                condition:
                  span:
                    start: 287
                    end: 293
                    file: 0
                  value:
                    BinaryOperator:
                      - Equal
                      - span:
                          start: 287
                          end: 288
                          file: 0
                        value:
                          Constant:
                            Identifier: i
                      - span:
                          start: 292
                          end: 293
                          file: 0
                        value:
                          Constant:
                            Integer: 2
                "yes":
                  Block:
                    - Break
                "no": ~
  interfaces: []
  classes: []
  custom_pcodes: []
  compile_options:
    swf_version: 15
    optimizations:
      fold_constants: true
      promote_variables_to_registers: true