1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/script/basic/parser/primaryExpr.js.EXPECTED Thu Sep 12 22:16:40 2013 +0530 1.3 @@ -0,0 +1,199 @@ 1.4 +{ 1.5 + "type": "Program", 1.6 + "body": [ 1.7 + { 1.8 + "type": "ExpressionStatement", 1.9 + "expression": { 1.10 + "type": "ThisExpression" 1.11 + } 1.12 + } 1.13 + ] 1.14 +} 1.15 +{ 1.16 + "type": "Program", 1.17 + "body": [ 1.18 + { 1.19 + "type": "ExpressionStatement", 1.20 + "expression": { 1.21 + "type": "Identifier", 1.22 + "name": "foo" 1.23 + } 1.24 + } 1.25 + ] 1.26 +} 1.27 +{ 1.28 + "type": "Program", 1.29 + "body": [ 1.30 + { 1.31 + "type": "ExpressionStatement", 1.32 + "expression": { 1.33 + "type": "Literal", 1.34 + "value": null 1.35 + } 1.36 + } 1.37 + ] 1.38 +} 1.39 +{ 1.40 + "type": "Program", 1.41 + "body": [ 1.42 + { 1.43 + "type": "ExpressionStatement", 1.44 + "expression": { 1.45 + "type": "Literal", 1.46 + "value": true 1.47 + } 1.48 + } 1.49 + ] 1.50 +} 1.51 +{ 1.52 + "type": "Program", 1.53 + "body": [ 1.54 + { 1.55 + "type": "ExpressionStatement", 1.56 + "expression": { 1.57 + "type": "Literal", 1.58 + "value": false 1.59 + } 1.60 + } 1.61 + ] 1.62 +} 1.63 +{ 1.64 + "type": "Program", 1.65 + "body": [ 1.66 + { 1.67 + "type": "ExpressionStatement", 1.68 + "expression": { 1.69 + "type": "Literal", 1.70 + "value": 33 1.71 + } 1.72 + } 1.73 + ] 1.74 +} 1.75 +{ 1.76 + "type": "Program", 1.77 + "body": [ 1.78 + { 1.79 + "type": "ExpressionStatement", 1.80 + "expression": { 1.81 + "type": "Literal", 1.82 + "value": 3.14 1.83 + } 1.84 + } 1.85 + ] 1.86 +} 1.87 +{ 1.88 + "type": "Program", 1.89 + "body": [ 1.90 + { 1.91 + "type": "ExpressionStatement", 1.92 + "expression": { 1.93 + "type": "BinaryExpression", 1.94 + "operator": "*", 1.95 + "left": { 1.96 + "type": "BinaryExpression", 1.97 + "operator": "+", 1.98 + "left": { 1.99 + "type": "Literal", 1.100 + "value": 10 1.101 + }, 1.102 + "right": { 1.103 + "type": "Literal", 1.104 + "value": 3 1.105 + } 1.106 + }, 1.107 + "right": { 1.108 + "type": "Literal", 1.109 + "value": 2 1.110 + } 1.111 + } 1.112 + } 1.113 + ] 1.114 +} 1.115 +{ 1.116 + "type": "Program", 1.117 + "body": [ 1.118 + { 1.119 + "type": "ExpressionStatement", 1.120 + "expression": { 1.121 + "type": "ObjectExpression", 1.122 + "properties": [] 1.123 + } 1.124 + } 1.125 + ] 1.126 +} 1.127 +{ 1.128 + "type": "Program", 1.129 + "body": [ 1.130 + { 1.131 + "type": "ExpressionStatement", 1.132 + "expression": { 1.133 + "type": "ObjectExpression", 1.134 + "properties": [ 1.135 + { 1.136 + "key": { 1.137 + "type": "Identifier", 1.138 + "name": "x" 1.139 + }, 1.140 + "value": { 1.141 + "type": "Literal", 1.142 + "value": 3 1.143 + }, 1.144 + "kind": "init" 1.145 + } 1.146 + ] 1.147 + } 1.148 + } 1.149 + ] 1.150 +} 1.151 +{ 1.152 + "type": "Program", 1.153 + "body": [ 1.154 + { 1.155 + "type": "ExpressionStatement", 1.156 + "expression": { 1.157 + "type": "ArrayExpression", 1.158 + "elements": [] 1.159 + } 1.160 + } 1.161 + ] 1.162 +} 1.163 +{ 1.164 + "type": "Program", 1.165 + "body": [ 1.166 + { 1.167 + "type": "ExpressionStatement", 1.168 + "expression": { 1.169 + "type": "ArrayExpression", 1.170 + "elements": [ 1.171 + null, 1.172 + null 1.173 + ] 1.174 + } 1.175 + } 1.176 + ] 1.177 +} 1.178 +{ 1.179 + "type": "Program", 1.180 + "body": [ 1.181 + { 1.182 + "type": "ExpressionStatement", 1.183 + "expression": { 1.184 + "type": "ArrayExpression", 1.185 + "elements": [ 1.186 + { 1.187 + "type": "Literal", 1.188 + "value": 4 1.189 + }, 1.190 + { 1.191 + "type": "Literal", 1.192 + "value": 5 1.193 + }, 1.194 + { 1.195 + "type": "Literal", 1.196 + "value": 5 1.197 + } 1.198 + ] 1.199 + } 1.200 + } 1.201 + ] 1.202 +}