def getFilterMap(callNode, fileId_): global fileId, verbose verbose = True fileId = fileId_ result = {} if callNode.type != "call": return result operand = callNode.getChild("operand") if operand: operand_string, isComplete = treeutil.assembleVariable(operand.getChildByPosition(0)) if not operand or not isComplete or operand_string != "qx.core.Environment.filter": log("Warning", "Can only work on qx.core.Environment.filter call. Ignoring this occurrence.", operand) return result params = callNode.getChild("params") if len(params.children) != 1: log("Warning", "Expecting exactly one argument for qx.core.Environment.filter. Ignoring this occurrence.", params) return result # Get the map from the find call firstParam = params.getChildByPosition(0) if not firstParam.type == "map": log("Warning", "First argument must be a map! Ignoring this occurrence.", firstParam) return result result = treeutil.mapNodeToMap(firstParam) return result
def _getMembersMap(self): classMap = self._getClassMap() if not "members" in classMap: return {} members = treeutil.mapNodeToMap(classMap["members"].children[0]) return members
def _getMembersMap(self): classMap = self._getClassMap() if not "members" in classMap: return {} members = treeutil.mapNodeToMap(classMap["members"].children[0]) return members
def _getClassMap(self): define = treeutil.findQxDefine(self.tree) if not define: return {} classMapNode = treeutil.selectNode(define, "params/2") if classMapNode is None: return {} classMap = treeutil.mapNodeToMap(classMapNode) return classMap
def _getClassMap(self): define = treeutil.findQxDefine(self.tree) if not define: return {} classMapNode = treeutil.selectNode(define, "params/2") if classMapNode is None: return {} classMap = treeutil.mapNodeToMap(classMapNode) return classMap
def getFilterMap(callNode, fileId_): global fileId, verbose verbose = True fileId = fileId_ result = {} if callNode.type != "call": return result operand = callNode.getChild("operand") if operand: operand_string, isComplete = treeutil.assembleVariable( operand.getChildByPosition(0)) if not operand or not isComplete or operand_string != "qx.core.Environment.filter": log( "Warning", "Can only work on qx.core.Environment.filter call. Ignoring this occurrence.", operand) return result params = callNode.getChild("params") if len(params.children) != 1: log( "Warning", "Expecting exactly one argument for qx.core.Environment.filter. Ignoring this occurrence.", params) return result # Get the map from the find call firstParam = params.getChildByPosition(0) if not firstParam.type == "map": log("Warning", "First argument must be a map! Ignoring this occurrence.", firstParam) return result result = treeutil.mapNodeToMap(firstParam) return result