30 lines
612 B
Python
30 lines
612 B
Python
"""Command-line entry point for SLS Python."""
|
|
import click
|
|
|
|
from . import __version__
|
|
|
|
|
|
@click.group()
|
|
@click.version_option(__version__)
|
|
def main():
|
|
"""sls: Small Lisp-like language (Python reimplementation)."""
|
|
pass
|
|
|
|
|
|
@main.command()
|
|
def repl():
|
|
"""Start a minimal REPL."""
|
|
from .repl import repl_loop
|
|
|
|
repl_loop()
|
|
|
|
|
|
@main.command()
|
|
@click.argument("file", required=False)
|
|
def run(file):
|
|
"""Run an SLS source file (placeholder)."""
|
|
if not file:
|
|
click.echo("No file provided; start with `sls repl`")
|
|
return
|
|
click.echo(f"Would run: {file} (not implemented yet)")
|