Return an API dependency expression translated to a form suitable for asciidoctor conditionals or header file comments. - dependency - the expression - leafMarkup - function taking an extension / version name and returning an equivalent marked up version -
(dependency, leafMarkup, opMarkup, parenthesize)
| 260 | raise Exception(f'invalid op: {op}') |
| 261 | |
| 262 | def dependencyLanguage(dependency, leafMarkup, opMarkup, parenthesize): |
| 263 | """Return an API dependency expression translated to a form suitable for |
| 264 | asciidoctor conditionals or header file comments. |
| 265 | |
| 266 | - dependency - the expression |
| 267 | - leafMarkup - function taking an extension / version name and |
| 268 | returning an equivalent marked up version |
| 269 | - opMarkup - function taking an operator ('+' / ',') name name and |
| 270 | returning an equivalent marked up version |
| 271 | - parenthesize - True if parentheses should be used in the resulting |
| 272 | expression, False otherwise""" |
| 273 | |
| 274 | global exprStack |
| 275 | exprStack = [] |
| 276 | results = dependencyBNF().parse_string(dependency, parse_all=True) |
| 277 | return evalDependencyLanguage(exprStack, leafMarkup, opMarkup, parenthesize, root = True, parent_op = None) |
| 278 | |
| 279 | # aka specmacros = False |
| 280 | def dependencyLanguageComment(dependency): |
no test coverage detected