Cleaned up stuff from porting

This commit is contained in:
Kyler Olsen 2025-12-03 15:07:52 -07:00
parent 35a6f4537f
commit 5b5e24e633
3 changed files with 3 additions and 18 deletions

View File

@ -1,8 +1,6 @@
"""sls — Python skeleton for SLS reimplementation """sls — Python SLS reimplementation
Expose package version and small helpers here. Expose package version and small helpers here.
""" """
__all__ = ["__version__", "cli"] __all__ = ["main"]
__version__ = "0.0.1"

View File

@ -1,16 +1,8 @@
# sls/interpreter.py
# Kyler Olsen
# YREA SLS
# Interpreter (Python OOP port)
# November 2025
from __future__ import annotations from __future__ import annotations
from dataclasses import dataclass from dataclasses import dataclass
from enum import Enum, auto from enum import Enum, auto
from typing import Callable, Dict, List, Optional from typing import Callable, Dict, List, Optional
# import the types from your lexer module
# adjust the import path to where you put the lexer module
from .lexer import ( from .lexer import (
Token, Token,
TokenType, TokenType,
@ -76,7 +68,7 @@ class InterpreterState:
def __init__(self): def __init__(self):
self.stack: List[StackEntry] = [] self.stack: List[StackEntry] = []
self.functions: Dict[str, FunctionItem] = {} self.functions: Dict[str, FunctionItem] = {}
# Optionally load builtins; caller can pass a loader function
if load_builtins is not None: if load_builtins is not None:
ok = load_builtins(self) ok = load_builtins(self)
if not ok: if not ok:

View File

@ -1,8 +1,3 @@
# Kyler Olsen
# YREA SLS
# Meta File (Python port)
# November 2025
import sys import sys
try: try:
from ._version import version, commit, timestamp # type: ignore from ._version import version, commit, timestamp # type: ignore