Skip to content

Commit 9e07481

Browse files
committed
allow to execute multiple files
1 parent d6ebcd4 commit 9e07481

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

lambda_repl/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
from .parsing import LambdaTransformer
1515
from .aliases import Aliases
1616

17-
__version__ = "1.0.0"
17+
__version__ = "1.1.0"
1818
__author__ = "Eric Niklas Wolf"
1919
__email__ = "eric_niklas.wolf@mailbox.tu-dresden.de"
2020
__all__ = (

lambda_repl/main.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"-f",
2727
"--file",
2828
type=FileType("r"),
29-
help="file which should be executed in the REPL"
29+
action="append",
30+
help="add file which should be executed in the REPL"
3031
)
3132

3233

@@ -37,8 +38,8 @@ def main(args: Namespace) -> int:
3738
LambdaTransformer(),
3839
BetaNormalisingVisitor()
3940
)
40-
if args.file is not None:
41-
for line in args.file:
41+
for file in args.file or ():
42+
for line in file:
4243
repl.cmdqueue.append(line)
4344
repl.cmdloop()
4445
return 0

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "lambda_repl"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
description = "REPL for the lambda calculus"
55
requires-python = ">=3.10"
66
keywords = []

0 commit comments

Comments
 (0)