/// <summary> /// Traverses the identifierlist argument until class name resolution succeeds or fails. /// </summary> /// <param name="classTable"></param> /// <param name="identList"></param> /// <returns></returns> public static string[] GetResolvedClassName(ProtoCore.DSASM.ClassTable classTable, ProtoCore.AST.AssociativeAST.IdentifierListNode identList) { string[] classNames = classTable.GetAllMatchingClasses(ProtoCore.Utils.CoreUtils.GetIdentifierStringUntilFirstParenthesis(identList)); // Failed to find the first time // Attempt to remove identifiers in the identifierlist until we find a class or not while (0 == classNames.Length) { // Move to the left node AssociativeNode leftNode = identList.LeftNode; if (leftNode is IdentifierListNode) { identList = leftNode as IdentifierListNode; classNames = classTable.GetAllMatchingClasses(ProtoCore.Utils.CoreUtils.GetIdentifierStringUntilFirstParenthesis(identList)); } else { break; } } return classNames; }