def get_getters(l): getterlist = [] for line in l: for x in props.getProps(line): if x is None: yield '' else: if getters.gen_getter(x) is None: yield '' else: yield getters.gen_getter(x)
def get_type_name(input_lines): for line in input_lines: for rline in props.getProps(line): mtype = filter(lambda x: len(x), re.split(r'[;,\s ]\s*', rline))[2].replace('*', '') name = filter(lambda x: len(x), re.split(r'[;,\s ]\s*', rline))[3].replace('*', '') sf = '' try: sf = filter(lambda x: len(x), re.split(r'[;,\s ]\s*', line))[2].replace('*', '') except: sf = 'self.view' yield (mtype, name, sf)
def out_getters(): l = readlines_from_stdin() if len(filter(lambda line: '@property' in line, l)): for line in l: print line for line in l: if line.startswith('/'): print line elif '@property' in line: gen_getter(line) else: for rline in props.getProps(line): print gen_getter(rline)
def get_props_all(l): propall = [] for line in l: for x in props.getProps(line): propall.append(x) return '\n'.join(propall)