rascal 0.2.1

A parser and compiler for Flash ActionScript 2 files into SWFs
Documentation
---
source: crates/rascal/src/tests.rs
expression: result
input_file: samples/as2/try_catch.as
---
initializer:
  actions:
    - ConstantPool:
        - " -- try catch finally -- "
        - try!
        - message
        - Hello World!
        - catch!
        - e
        - finally!
        - " -- try catch -- "
        - test
        - "caught something! "
        - " -- try catch(MovieClip) finally -- "
        - this
        - " -- try catch(MovieClip) catch(Number) --"
        - catch something of MovieClip!
        - catch something of Number!
        - catch anything else!
        - " -- try finally -- "
        - "If you see this, it didn't throw! :("
    - Push:
        - Constant: 0
    - Trace
    - Try:
        try_body:
          actions:
            - Push:
                - Constant: 1
            - Trace
            - Push:
                - Constant: 2
                - Constant: 3
            - DefineLocal
            - Push:
                - Constant: 2
            - GetVariable
            - Throw
          label_positions: {}
        catch_body:
          - Variable: e
          - actions:
              - Push:
                  - Constant: 4
              - Trace
              - Push:
                  - Constant: 5
              - GetVariable
              - Trace
            label_positions: {}
        finally_body:
          actions:
            - Push:
                - Constant: 6
            - Trace
          label_positions: {}
    - Push:
        - Constant: 7
    - Trace
    - Try:
        try_body:
          actions:
            - Push:
                - Constant: 1
            - Trace
            - Push:
                - Constant: 8
            - Throw
          label_positions: {}
        catch_body:
          - Variable: e
          - actions:
              - Push:
                  - Constant: 9
                  - Constant: 5
              - GetVariable
              - Add2
              - Trace
            label_positions: {}
        finally_body: ~
    - Push:
        - Constant: 10
    - Trace
    - Try:
        try_body:
          actions:
            - Push:
                - Constant: 1
            - Trace
            - Push:
                - Constant: 11
            - GetVariable
            - Throw
          label_positions: {}
        catch_body:
          - Register: 0
          - actions:
              - Push:
                  - String: MovieClip
              - GetVariable
              - Push:
                  - Register: 0
              - CastOp
              - PushDuplicate
              - Push:
                  - "Null"
              - Equals2
              - If: loc0001
              - Push:
                  - String: e
              - StackSwap
              - DefineLocal
              - Push:
                  - Constant: 9
                  - Constant: 5
              - GetVariable
              - Add2
              - Trace
              - Jump: loc0000
              - Pop
              - Push:
                  - Register: 0
              - Throw
            label_positions:
              loc0001: 16
        finally_body:
          actions:
            - Push:
                - Constant: 6
            - Trace
          label_positions:
            loc0000: 0
    - Push:
        - Constant: 12
    - Trace
    - Try:
        try_body:
          actions:
            - Push:
                - Constant: 1
            - Trace
            - Push:
                - Constant: 11
            - GetVariable
            - Throw
          label_positions: {}
        catch_body:
          - Register: 0
          - actions:
              - Push:
                  - String: MovieClip
              - GetVariable
              - Push:
                  - Register: 0
              - CastOp
              - PushDuplicate
              - Push:
                  - "Null"
              - Equals2
              - If: loc0003
              - Push:
                  - String: e
              - StackSwap
              - DefineLocal
              - Push:
                  - Constant: 13
              - Trace
              - Jump: loc0002
              - Pop
              - Push:
                  - String: Number
              - GetVariable
              - Push:
                  - Register: 0
              - CastOp
              - PushDuplicate
              - Push:
                  - "Null"
              - Equals2
              - If: loc0004
              - Push:
                  - String: e
              - StackSwap
              - DefineLocal
              - Push:
                  - Constant: 14
              - Trace
              - Jump: loc0002
              - Pop
              - Push:
                  - Register: 0
                  - String: e
              - StackSwap
              - DefineLocal
              - Push:
                  - Constant: 15
              - Trace
            label_positions:
              loc0003: 14
              loc0004: 29
        finally_body: ~
    - Push:
        - Constant: 16
    - Trace
    - Try:
        try_body:
          actions:
            - Push:
                - Constant: 1
            - Trace
            - Push:
                - "Null"
            - Throw
          label_positions: {}
        catch_body: ~
        finally_body:
          actions:
            - Push:
                - Constant: 6
            - Trace
          label_positions: {}
    - Push:
        - Constant: 17
    - Trace
  label_positions:
    loc0002: 13
extra_modules: []
swf_version: 15