(source: str)
| 200 | ################ command-line interface |
| 201 | |
| 202 | def run(source: str) -> Any: |
| 203 | global_env = Environment({}, standard_env()) |
| 204 | tokens = tokenize(source) |
| 205 | while tokens: |
| 206 | exp = read_from_tokens(tokens) |
| 207 | result = evaluate(exp, global_env) |
| 208 | return result |
| 209 | |
| 210 | def main(args: list[str]) -> None: |
| 211 | if len(args) == 1: |