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

changeset 0
b1a7da25b547
child 952
6d5471a497fb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/test/script/basic/parser/objectLitExpr.js.EXPECTED	Wed Apr 27 01:36:41 2016 +0800
     1.3 @@ -0,0 +1,183 @@
     1.4 +{
     1.5 +    "type": "Program",
     1.6 +    "body": [
     1.7 +        {
     1.8 +            "type": "ExpressionStatement",
     1.9 +            "expression": {
    1.10 +                "type": "AssignmentExpression",
    1.11 +                "operator": "=",
    1.12 +                "left": {
    1.13 +                    "type": "Identifier",
    1.14 +                    "name": "obj"
    1.15 +                },
    1.16 +                "right": {
    1.17 +                    "type": "ObjectExpression",
    1.18 +                    "properties": []
    1.19 +                }
    1.20 +            }
    1.21 +        }
    1.22 +    ]
    1.23 +}
    1.24 +{
    1.25 +    "type": "Program",
    1.26 +    "body": [
    1.27 +        {
    1.28 +            "type": "ExpressionStatement",
    1.29 +            "expression": {
    1.30 +                "type": "AssignmentExpression",
    1.31 +                "operator": "=",
    1.32 +                "left": {
    1.33 +                    "type": "Identifier",
    1.34 +                    "name": "p"
    1.35 +                },
    1.36 +                "right": {
    1.37 +                    "type": "ObjectExpression",
    1.38 +                    "properties": [
    1.39 +                        {
    1.40 +                            "key": {
    1.41 +                                "type": "Identifier",
    1.42 +                                "name": "x"
    1.43 +                            },
    1.44 +                            "value": {
    1.45 +                                "type": "Literal",
    1.46 +                                "value": 10
    1.47 +                            },
    1.48 +                            "kind": "init"
    1.49 +                        },
    1.50 +                        {
    1.51 +                            "key": {
    1.52 +                                "type": "Identifier",
    1.53 +                                "name": "y"
    1.54 +                            },
    1.55 +                            "value": {
    1.56 +                                "type": "Literal",
    1.57 +                                "value": 2
    1.58 +                            },
    1.59 +                            "kind": "init"
    1.60 +                        }
    1.61 +                    ]
    1.62 +                }
    1.63 +            }
    1.64 +        }
    1.65 +    ]
    1.66 +}
    1.67 +{
    1.68 +    "type": "Program",
    1.69 +    "body": [
    1.70 +        {
    1.71 +            "type": "ExpressionStatement",
    1.72 +            "expression": {
    1.73 +                "type": "AssignmentExpression",
    1.74 +                "operator": "=",
    1.75 +                "left": {
    1.76 +                    "type": "Identifier",
    1.77 +                    "name": "p"
    1.78 +                },
    1.79 +                "right": {
    1.80 +                    "type": "ObjectExpression",
    1.81 +                    "properties": [
    1.82 +                        {
    1.83 +                            "key": {
    1.84 +                                "type": "Literal",
    1.85 +                                "value": "x"
    1.86 +                            },
    1.87 +                            "value": {
    1.88 +                                "type": "Literal",
    1.89 +                                "value": 10
    1.90 +                            },
    1.91 +                            "kind": "init"
    1.92 +                        },
    1.93 +                        {
    1.94 +                            "key": {
    1.95 +                                "type": "Literal",
    1.96 +                                "value": "y"
    1.97 +                            },
    1.98 +                            "value": {
    1.99 +                                "type": "Literal",
   1.100 +                                "value": 2
   1.101 +                            },
   1.102 +                            "kind": "init"
   1.103 +                        }
   1.104 +                    ]
   1.105 +                }
   1.106 +            }
   1.107 +        }
   1.108 +    ]
   1.109 +}
   1.110 +{
   1.111 +    "type": "Program",
   1.112 +    "body": [
   1.113 +        {
   1.114 +            "type": "ExpressionStatement",
   1.115 +            "expression": {
   1.116 +                "type": "AssignmentExpression",
   1.117 +                "operator": "=",
   1.118 +                "left": {
   1.119 +                    "type": "Identifier",
   1.120 +                    "name": "p"
   1.121 +                },
   1.122 +                "right": {
   1.123 +                    "type": "ObjectExpression",
   1.124 +                    "properties": [
   1.125 +                        {
   1.126 +                            "key": {
   1.127 +                                "type": "Identifier",
   1.128 +                                "name": "x"
   1.129 +                            },
   1.130 +                            "value": {
   1.131 +                                "type": "FunctionExpression",
   1.132 +                                "id": null,
   1.133 +                                "params": [],
   1.134 +                                "defaults": [],
   1.135 +                                "rest": null,
   1.136 +                                "body": {
   1.137 +                                    "type": "BlockStatement",
   1.138 +                                    "body": [
   1.139 +                                        {
   1.140 +                                            "type": "ReturnStatement",
   1.141 +                                            "argument": {
   1.142 +                                                "type": "Identifier",
   1.143 +                                                "name": "xValue"
   1.144 +                                            }
   1.145 +                                        }
   1.146 +                                    ]
   1.147 +                                },
   1.148 +                                "generator": false,
   1.149 +                                "expression": false
   1.150 +                            },
   1.151 +                            "kind": "get"
   1.152 +                        },
   1.153 +                        {
   1.154 +                            "key": {
   1.155 +                                "type": "Identifier",
   1.156 +                                "name": "y"
   1.157 +                            },
   1.158 +                            "value": {
   1.159 +                                "type": "FunctionExpression",
   1.160 +                                "id": null,
   1.161 +                                "params": [],
   1.162 +                                "defaults": [],
   1.163 +                                "rest": null,
   1.164 +                                "body": {
   1.165 +                                    "type": "BlockStatement",
   1.166 +                                    "body": [
   1.167 +                                        {
   1.168 +                                            "type": "ReturnStatement",
   1.169 +                                            "argument": {
   1.170 +                                                "type": "Identifier",
   1.171 +                                                "name": "yValue"
   1.172 +                                            }
   1.173 +                                        }
   1.174 +                                    ]
   1.175 +                                },
   1.176 +                                "generator": false,
   1.177 +                                "expression": false
   1.178 +                            },
   1.179 +                            "kind": "get"
   1.180 +                        }
   1.181 +                    ]
   1.182 +                }
   1.183 +            }
   1.184 +        }
   1.185 +    ]
   1.186 +}

mercurial