@@ -715,12 +715,15 @@ export class ASTVisitor extends BaseVisitor {
715715 *
716716 * @memberOf ASTVisitor
717717 */
718- public CallExpression ( { id, args } : NodeContext ) : ASTNode {
718+ public CallExpression ( { id, args, properties } : NodeContext ) : ASTNode {
719+ properties = this . asArray ( properties )
720+ const tail = properties . length > 0 ? last ( properties ) : args
719721 return {
720- ...this . Location ( id , args ) ,
722+ ...this . Location ( id , tail ) ,
721723 args,
722724 callee : id ,
723- type : 'CallExpression'
725+ properties,
726+ type : 'CallExpression' ,
724727 }
725728 }
726729
@@ -757,7 +760,7 @@ export class ASTVisitor extends BaseVisitor {
757760 this . singleArgument ( ctx ) ||
758761 this . mapArguments ( ctx , ( { id, properties = [ ] , args = '' } ) => {
759762 if ( args ) {
760- return this . asNode ( this . CallExpression ( { id, args } ) , ctx )
763+ return this . asNode ( this . CallExpression ( { id, args, properties } ) , ctx )
761764 } else {
762765 return this . asNode ( this . ObjectMemberExpression ( { id, properties } ) , ctx )
763766 }
@@ -778,7 +781,7 @@ export class ASTVisitor extends BaseVisitor {
778781 this . singleArgument ( ctx ) ||
779782 this . mapArguments ( ctx , ( { property, args } ) => {
780783 if ( args ) {
781- return this . CallExpression ( { id : property , args } )
784+ return this . CallExpression ( { id : property , args, properties : [ ] } )
782785 } else {
783786 return this . ObjectMemberExpression ( { id : property , properties : [ ] } )
784787 }
@@ -841,7 +844,6 @@ export class ASTVisitor extends BaseVisitor {
841844 )
842845 } )
843846 }
844-
845847 /**
846848 *
847849 *
0 commit comments