test/script/basic/parser/returnStat.js.EXPECTED

Thu, 12 Sep 2013 22:16:40 +0530

author
sundar
date
Thu, 12 Sep 2013 22:16:40 +0530
changeset 551
917b16e509bd
parent 0
b1a7da25b547
permissions
-rw-r--r--

8024693: Various minor issues with JSONWriter used by script parser API
Reviewed-by: jlaskey, hannesw

     1 {
     2     "type": "Program",
     3     "body": [
     4         {
     5             "type": "ExpressionStatement",
     6             "expression": {
     7                 "type": "FunctionExpression",
     8                 "id": null,
     9                 "params": [],
    10                 "defaults": [],
    11                 "rest": null,
    12                 "body": {
    13                     "type": "BlockStatement",
    14                     "body": [
    15                         {
    16                             "type": "ReturnStatement",
    17                             "argument": null
    18                         }
    19                     ]
    20                 },
    21                 "generator": false,
    22                 "expression": false
    23             }
    24         }
    25     ]
    26 }
    27 {
    28     "type": "Program",
    29     "body": [
    30         {
    31             "type": "ExpressionStatement",
    32             "expression": {
    33                 "type": "FunctionExpression",
    34                 "id": null,
    35                 "params": [],
    36                 "defaults": [],
    37                 "rest": null,
    38                 "body": {
    39                     "type": "BlockStatement",
    40                     "body": [
    41                         {
    42                             "type": "ReturnStatement",
    43                             "argument": {
    44                                 "type": "Identifier",
    45                                 "name": "res"
    46                             }
    47                         }
    48                     ]
    49                 },
    50                 "generator": false,
    51                 "expression": false
    52             }
    53         }
    54     ]
    55 }
    56 {
    57     "type": "Program",
    58     "body": [
    59         {
    60             "type": "ExpressionStatement",
    61             "expression": {
    62                 "type": "FunctionExpression",
    63                 "id": null,
    64                 "params": [],
    65                 "defaults": [],
    66                 "rest": null,
    67                 "body": {
    68                     "type": "BlockStatement",
    69                     "body": [
    70                         {
    71                             "type": "ReturnStatement",
    72                             "argument": {
    73                                 "type": "CallExpression",
    74                                 "callee": {
    75                                     "type": "Identifier",
    76                                     "name": "foo"
    77                                 },
    78                                 "arguments": []
    79                             }
    80                         }
    81                     ]
    82                 },
    83                 "generator": false,
    84                 "expression": false
    85             }
    86         }
    87     ]
    88 }

mercurial