(const, tokens)
| 92 | tokens.append(node) |
| 93 | |
| 94 | def appendConstantToken(const, tokens): |
| 95 | if type(const.value) == str: |
| 96 | tokens.append(SplootNode("STRING_LITERAL", {}, {"value": const.value})) |
| 97 | elif type(const.value) == int or type(const.value) == float: |
| 98 | tokens.append(SplootNode("NUMERIC_LITERAL", {}, {"value": const.value})) |
| 99 | elif type(const.value) == bool: |
| 100 | tokens.append(SplootNode("PYTHON_BOOL", {}, {"value": const.value})) |
| 101 | elif const.value is None: |
| 102 | tokens.append(SplootNode("PYTHON_NONE", {})) |
| 103 | else: |
| 104 | raise Exception(f'Unsupported constant: {const.value}') |
| 105 | |
| 106 | def appendBinaryOperatorExpression(binOp, tokens): |
| 107 | generateExpression(binOp.left, tokens) |
no test coverage detected