view test/script/basic/parser/tryCatchStat.js.EXPECTED @ 561:917b16e509bd

8024693: Various minor issues with JSONWriter used by script parser API Reviewed-by: jlaskey, hannesw
author sundar
date Thu, 12 Sep 2013 22:16:40 +0530
parents
children
line wrap: on
line source
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": []
                            }
                        },
                        "finalizer": null
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": []
                            }
                        },
                        "finalizer": {
                            "type": "BlockStatement",
                            "body": []
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": null,
                        "finalizer": {
                            "type": "BlockStatement",
                            "body": []
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": []
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": [
                                    {
                                        "type": "ExpressionStatement",
                                        "expression": {
                                            "type": "CallExpression",
                                            "callee": {
                                                "type": "Identifier",
                                                "name": "handle"
                                            },
                                            "arguments": []
                                        }
                                    }
                                ]
                            }
                        },
                        "finalizer": null
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": [
                                {
                                    "type": "ExpressionStatement",
                                    "expression": {
                                        "type": "CallExpression",
                                        "callee": {
                                            "type": "Identifier",
                                            "name": "that"
                                        },
                                        "arguments": []
                                    }
                                }
                            ]
                        },
                        "guardedHandlers": [],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": [
                                    {
                                        "type": "ExpressionStatement",
                                        "expression": {
                                            "type": "CallExpression",
                                            "callee": {
                                                "type": "Identifier",
                                                "name": "handle"
                                            },
                                            "arguments": []
                                        }
                                    }
                                ]
                            }
                        },
                        "finalizer": {
                            "type": "BlockStatement",
                            "body": [
                                {
                                    "type": "ExpressionStatement",
                                    "expression": {
                                        "type": "CallExpression",
                                        "callee": {
                                            "type": "Identifier",
                                            "name": "clean"
                                        },
                                        "arguments": []
                                    }
                                }
                            ]
                        }
                    }
                ]
            }
        }
    ]
}
{
    "type": "Program",
    "body": [
        {
            "type": "BlockStatement",
            "block": {
                "type": "BlockStatement",
                "body": [
                    {
                        "type": "TryStatement",
                        "block": {
                            "type": "BlockStatement",
                            "body": [
                                {
                                    "type": "ExpressionStatement",
                                    "expression": {
                                        "type": "CallExpression",
                                        "callee": {
                                            "type": "Identifier",
                                            "name": "that"
                                        },
                                        "arguments": []
                                    }
                                }
                            ]
                        },
                        "guardedHandlers": [
                            {
                                "type": "CatchClause",
                                "param": {
                                    "type": "Identifier",
                                    "name": "e"
                                },
                                "guard": {
                                    "type": "BinaryExpression",
                                    "operator": "instanceof",
                                    "left": {
                                        "type": "Identifier",
                                        "name": "e"
                                    },
                                    "right": {
                                        "type": "Identifier",
                                        "name": "TypeError"
                                    }
                                },
                                "body": {
                                    "type": "BlockStatement",
                                    "body": [
                                        {
                                            "type": "ExpressionStatement",
                                            "expression": {
                                                "type": "CallExpression",
                                                "callee": {
                                                    "type": "Identifier",
                                                    "name": "handle"
                                                },
                                                "arguments": []
                                            }
                                        }
                                    ]
                                }
                            }
                        ],
                        "handler": {
                            "type": "CatchClause",
                            "param": {
                                "type": "Identifier",
                                "name": "e"
                            },
                            "body": {
                                "type": "BlockStatement",
                                "body": [
                                    {
                                        "type": "ExpressionStatement",
                                        "expression": {
                                            "type": "CallExpression",
                                            "callee": {
                                                "type": "Identifier",
                                                "name": "rest"
                                            },
                                            "arguments": []
                                        }
                                    }
                                ]
                            }
                        },
                        "finalizer": null
                    }
                ]
            }
        }
    ]
}