Returns list of ternary operands including nested ones.
(token)
| 1235 | |
| 1236 | |
| 1237 | def getTernaryOperandsRecursive(token): |
| 1238 | """Returns list of ternary operands including nested ones.""" |
| 1239 | if not isTernaryOperator(token): |
| 1240 | return [] |
| 1241 | result = [] |
| 1242 | result += getTernaryOperandsRecursive(token.astOperand2.astOperand1) |
| 1243 | if token.astOperand2.astOperand1 and not isTernaryOperator(token.astOperand2.astOperand1): |
| 1244 | result += [token.astOperand2.astOperand1] |
| 1245 | result += getTernaryOperandsRecursive(token.astOperand2.astOperand2) |
| 1246 | if token.astOperand2.astOperand2 and not isTernaryOperator(token.astOperand2.astOperand2): |
| 1247 | result += [token.astOperand2.astOperand2] |
| 1248 | return result |
| 1249 | |
| 1250 | |
| 1251 | def hasNumericEscapeSequence(symbols): |
no test coverage detected