static int getInvocationArgsCount ( Node invocation ) { if ( invocation . isTaggedTemplateLit ( ) ) { Iterable < Node > args = new TemplateArgsIterable ( invocation . getLastChild ( ) ) ; return Iterables . size ( args ) + 1 ; } else { return invocation . getChildCount ( ) - 1 ; } }
Returns the number of arguments in this invocation . For template literals it takes into account the implicit first argument of ITemplateArray