sync from Atlas

This commit is contained in:
Luciano Ramalho
2021-09-20 23:31:45 -03:00
parent c93076ac2b
commit ade9577a55
6 changed files with 21 additions and 28 deletions

View File

@@ -122,7 +122,7 @@ def standard_env() -> Environment:
# tag::REPL[]
def repl(prompt: str = 'lis.py> ') -> NoReturn:
"A prompt-read-eval-print loop."
global_env = standard_env()
global_env = Environment({}, standard_env())
while True:
ast = parse(input(prompt))
val = evaluate(ast, global_env)
@@ -200,7 +200,7 @@ class Procedure:
################ command-line interface
def run(source: str) -> Any:
global_env = standard_env()
global_env = Environment({}, standard_env())
tokens = tokenize(source)
while tokens:
exp = read_from_tokens(tokens)