sync from Atlas
This commit is contained in:
@@ -117,7 +117,7 @@ def standard_env() -> Environment:
|
||||
|
||||
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)
|
||||
@@ -190,7 +190,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)
|
||||
|
||||
Reference in New Issue
Block a user