1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/test/script/basic/parser/switchStat.js.EXPECTED Wed Apr 27 01:36:41 2016 +0800 1.3 @@ -0,0 +1,123 @@ 1.4 +{ 1.5 + "type": "Program", 1.6 + "body": [ 1.7 + { 1.8 + "type": "SwitchStatement", 1.9 + "discriminant": { 1.10 + "type": "Identifier", 1.11 + "name": "key" 1.12 + }, 1.13 + "cases": [] 1.14 + } 1.15 + ] 1.16 +} 1.17 +{ 1.18 + "type": "Program", 1.19 + "body": [ 1.20 + { 1.21 + "type": "SwitchStatement", 1.22 + "discriminant": { 1.23 + "type": "Identifier", 1.24 + "name": "key" 1.25 + }, 1.26 + "cases": [ 1.27 + { 1.28 + "type": "SwitchCase", 1.29 + "test": { 1.30 + "type": "Literal", 1.31 + "value": 2 1.32 + }, 1.33 + "consequent": [ 1.34 + { 1.35 + "type": "ExpressionStatement", 1.36 + "expression": { 1.37 + "type": "CallExpression", 1.38 + "callee": { 1.39 + "type": "Identifier", 1.40 + "name": "hello" 1.41 + }, 1.42 + "arguments": [] 1.43 + } 1.44 + }, 1.45 + { 1.46 + "type": "BreakStatement", 1.47 + "label": null 1.48 + } 1.49 + ] 1.50 + } 1.51 + ] 1.52 + } 1.53 + ] 1.54 +} 1.55 +{ 1.56 + "type": "Program", 1.57 + "body": [ 1.58 + { 1.59 + "type": "SwitchStatement", 1.60 + "discriminant": { 1.61 + "type": "Identifier", 1.62 + "name": "key" 1.63 + }, 1.64 + "cases": [ 1.65 + { 1.66 + "type": "SwitchCase", 1.67 + "test": { 1.68 + "type": "Literal", 1.69 + "value": 4 1.70 + }, 1.71 + "consequent": [ 1.72 + { 1.73 + "type": "ExpressionStatement", 1.74 + "expression": { 1.75 + "type": "CallExpression", 1.76 + "callee": { 1.77 + "type": "Identifier", 1.78 + "name": "hello" 1.79 + }, 1.80 + "arguments": [] 1.81 + } 1.82 + }, 1.83 + { 1.84 + "type": "BreakStatement", 1.85 + "label": null 1.86 + } 1.87 + ] 1.88 + }, 1.89 + { 1.90 + "type": "SwitchCase", 1.91 + "test": { 1.92 + "type": "Literal", 1.93 + "value": 2 1.94 + }, 1.95 + "consequent": [ 1.96 + { 1.97 + "type": "ExpressionStatement", 1.98 + "expression": { 1.99 + "type": "CallExpression", 1.100 + "callee": { 1.101 + "type": "Identifier", 1.102 + "name": "world" 1.103 + }, 1.104 + "arguments": [] 1.105 + } 1.106 + }, 1.107 + { 1.108 + "type": "BreakStatement", 1.109 + "label": null 1.110 + } 1.111 + ] 1.112 + }, 1.113 + { 1.114 + "type": "SwitchCase", 1.115 + "test": null, 1.116 + "consequent": [ 1.117 + { 1.118 + "type": "BreakStatement", 1.119 + "label": null 1.120 + } 1.121 + ] 1.122 + } 1.123 + ] 1.124 + } 1.125 + ] 1.126 +}