@@ -115,13 +115,14 @@ export default {
115115
116116 conditionalExpression ( path , print ) {
117117 const binaryExpression = call ( path , print , "binaryExpression" ) ;
118+ const expressions = map ( path , print , "expression" ) ;
118119 return path . node . children . QuestionMark
119120 ? group (
120121 indent (
121122 join ( line , [
122123 binaryExpression ,
123- [ "? " , call ( path , print , "expression" , 0 ) ] ,
124- [ ": " , call ( path , print , "expression" , 1 ) ]
124+ [ "? " , expressions [ 0 ] ] ,
125+ [ ": " , expressions [ 1 ] ]
125126 ] )
126127 )
127128 )
@@ -468,9 +469,9 @@ export default {
468469 return allArgsExpandable ;
469470 }
470471 const headArgs = args . slice ( 0 , - 1 ) ;
471- const huggedLastArg = call (
472- path ,
472+ const huggedLastArg = path . call (
473473 argPath => print ( argPath , { hug : true } ) ,
474+ "children" ,
474475 "expression" ,
475476 args . length - 1
476477 ) ;
@@ -756,7 +757,6 @@ function printTemplate<
756757 T extends StringTemplateCstNode | TextBlockTemplateCstNode ,
757758 C extends Exclude < IterProperties < T [ "children" ] > , "embeddedExpression" >
758759> ( path : AstPath < T > , print : JavaPrintFn , beginKey : C , midKey : C , endKey : C ) {
759- const { children } = path . node ;
760760 const begin = call ( path , ( { node } ) => node . image , beginKey ) ;
761761 const mids = map ( path , ( { node } ) => node . image , midKey ) ;
762762 const end = call ( path , ( { node } ) => node . image , endKey ) ;
0 commit comments