Home | History | Annotate | Download | only in scripts

Lines Matching full:conditional

51 # A regexp for finding Conditional attributes in interface definitions.
52 conditionalPattern = re.compile('interface[\s]*\[[^\]]*Conditional=([\_0-9a-zA-Z&|]*)')
85 # Wraps conditional with ENABLE() and replace '&','|' with '&&','||' if more than one conditional is specified.
86 def formatConditional(conditional):
91 return ' '.join(map(wrapWithEnable, conditional))
94 # Find the conditional interface attribute.
96 conditional = None
98 # Read file and look for "interface [ Conditional=XXX ]".
105 conditional = match.group(1)
106 conditional = re.split('([|&])', conditional)
108 return conditional
110 # Extracts conditional and interface name from each IDL file.
130 'conditional': extractConditional(f),
155 conditional = metaData['conditional']
157 if prevConditional and prevConditional != conditional:
159 if conditional and prevConditional != conditional:
160 output.append('\n#if %s\n' % formatConditional(conditional))
164 prevConditional = conditional