private Declaration ResolveInternal(VBAParser.ImplicitCallStmt_InStmtContext callSiteContext, Declaration localScope, ContextAccessorType accessorType, bool hasExplicitLetStatement = false, bool isAssignmentTarget = false) { if (callSiteContext == null) { return(null); } var dictionaryCall = callSiteContext.iCS_S_DictionaryCall(); var fieldCall = dictionaryCall == null ? null : dictionaryCall.dictionaryCallStmt(); return(ResolveInternal(callSiteContext.iCS_S_VariableOrProcedureCall(), localScope, accessorType, hasExplicitLetStatement, isAssignmentTarget) ?? ResolveInternal(callSiteContext.iCS_S_ProcedureOrArrayCall(), localScope, accessorType, hasExplicitLetStatement, isAssignmentTarget) ?? ResolveInternal(callSiteContext.iCS_S_MembersCall(), accessorType, localScope, hasExplicitLetStatement, isAssignmentTarget) ?? ResolveInternal(callSiteContext.iCS_S_DictionaryCall(), localScope, accessorType, fieldCall, hasExplicitLetStatement, isAssignmentTarget)); }
private VBAParser.AmbiguousIdentifierContext FindAssignmentTarget(VBAParser.ImplicitCallStmt_InStmtContext leftSide, DeclarationType accessorType) { VBAParser.AmbiguousIdentifierContext context; var call = Resolve(leftSide.iCS_S_ProcedureOrArrayCall(), out context, accessorType) ?? Resolve(leftSide.iCS_S_VariableOrProcedureCall(), out context, accessorType) ?? Resolve(leftSide.iCS_S_DictionaryCall(), out context, accessorType) ?? Resolve(leftSide.iCS_S_MembersCall(), out context, accessorType); return(context); }