File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11const {
22 doc : {
3- builders : { hardline }
3+ builders : { hardline, join }
44 }
55} = require ( 'prettier/standalone' ) ;
66
7- const printSeparatedList = require ( './print-separated-list' ) ;
8-
97const AssemblySwitch = {
108 print : ( { path, print } ) => [
119 'switch ' ,
1210 path . call ( print , 'expression' ) ,
13- printSeparatedList ( path . map ( print , 'cases' ) , {
14- firstSeparator : hardline ,
15- separator : hardline ,
16- lastSeparator : ''
17- } )
11+ hardline ,
12+ join ( hardline , path . map ( print , 'cases' ) )
1813 ]
1914} ;
2015
Original file line number Diff line number Diff line change @@ -200,18 +200,18 @@ contract Assembly {
200200 function caseAssembly() {
201201 assembly {
202202 switch value
203- case 0 {
204- mstore (
205- 0 ,
206- 0x0000000000000000000000000000000000000000000000000000000000000000
207- )
208- }
209- case 1 {
210- mstore (
211- 0 ,
212- 0x1111111111111111111111111111111111111111111111111111111111111111
213- )
214- }
203+ case 0 {
204+ mstore (
205+ 0 ,
206+ 0x0000000000000000000000000000000000000000000000000000000000000000
207+ )
208+ }
209+ case 1 {
210+ mstore (
211+ 0 ,
212+ 0x1111111111111111111111111111111111111111111111111111111111111111
213+ )
214+ }
215215 }
216216 }
217217
Original file line number Diff line number Diff line change @@ -108,13 +108,13 @@ contract Proxy {
108108 returndatacopy (0 , 0 , returndatasize )
109109
110110 switch result
111- // delegatecall returns 0 on error.
112- case 0 {
113- revert (0 , returndatasize )
114- }
115- default {
116- return (0 , returndatasize )
117- }
111+ // delegatecall returns 0 on error.
112+ case 0 {
113+ revert (0 , returndatasize )
114+ }
115+ default {
116+ return (0 , returndatasize )
117+ }
118118 }
119119 }
120120
You can’t perform that action at this time.
0 commit comments