@@ -37,7 +37,7 @@ export class IndexAccessExpression extends SlangNode {
3737 }
3838
3939 print ( path : AstPath < IndexAccessExpression > , print : PrintFunction ) : Doc {
40- const operandDoc = path . call ( print , 'operand' ) ;
40+ const operand = path . call ( print , 'operand' ) ;
4141 const indexDoc = [
4242 '[' ,
4343 printSeparatedItem ( [ path . call ( print , 'start' ) , path . call ( print , 'end' ) ] ) ,
@@ -46,16 +46,16 @@ export class IndexAccessExpression extends SlangNode {
4646
4747 // If we are at the end of a MemberAccessChain we should indent the
4848 // arguments accordingly.
49- if ( isLabel ( operandDoc ) && operandDoc . label === 'MemberAccessChain' ) {
49+ if ( isLabel ( operand ) && operand . label === 'MemberAccessChain' ) {
5050 const groupId = Symbol ( 'Slang.IndexAccessExpression.operand' ) ;
5151 // We wrap the expression in a label in case there is an IndexAccess or
5252 // a FunctionCall following this IndexAccess.
5353 return label ( 'MemberAccessChain' , [
54- group ( operandDoc . contents , { id : groupId } ) ,
54+ group ( operand . contents , { id : groupId } ) ,
5555 indentIfBreak ( indexDoc , { groupId } )
5656 ] ) ;
5757 }
5858
59- return [ operandDoc , indexDoc ] . flat ( ) ;
59+ return [ operand , indexDoc ] . flat ( ) ;
6060 }
6161}
0 commit comments