diff options
| -rw-r--r-- | neb.py | 5 | ||||
| -rw-r--r-- | neb/__init__.py | 6 | ||||
| -rw-r--r-- | neb/exceptions.py (renamed from exceptions.py) | 0 | ||||
| -rw-r--r-- | neb/interpreter.py (renamed from interpreter.py) | 10 | ||||
| -rw-r--r-- | neb/lexer.py (renamed from lexer.py) | 4 | ||||
| -rw-r--r-- | neb/parser.py (renamed from parser.py) | 2 | ||||
| -rw-r--r-- | neb/structs.py (renamed from structs.py) | 2 | ||||
| -rw-r--r-- | neb/typeclass.py (renamed from typeclass.py) | 0 |
8 files changed, 16 insertions, 13 deletions
@@ -1,7 +1,4 @@ -from lexer import lex -from parser import parse -from interpreter import interpret -from exceptions import NebPanic +from neb import lex, parse, interpret, NebPanic import sys import readline diff --git a/neb/__init__.py b/neb/__init__.py new file mode 100644 index 0000000..f5afe60 --- /dev/null +++ b/neb/__init__.py @@ -0,0 +1,6 @@ +from .structs import * +from .lexer import * +from .parser import * +from .interpreter import * +from .exceptions import * +from .typeclass import * diff --git a/exceptions.py b/neb/exceptions.py index 8bbe000..8bbe000 100644 --- a/exceptions.py +++ b/neb/exceptions.py diff --git a/interpreter.py b/neb/interpreter.py index c675930..760b3a6 100644 --- a/interpreter.py +++ b/neb/interpreter.py @@ -1,8 +1,8 @@ -from structs import * -from exceptions import * -from lexer import lex -from parser import parse -from typeclass import TypeEnum, is_subtype_of +from .structs import * +from .exceptions import * +from .lexer import lex +from .parser import parse +from .typeclass import TypeEnum, is_subtype_of from pathlib import Path from glob import glob import subprocess @@ -1,5 +1,5 @@ -from structs import TokenType, Token -from exceptions import LexError +from .structs import TokenType, Token +from .exceptions import LexError import sys diff --git a/parser.py b/neb/parser.py index 46e43e7..ea875fb 100644 --- a/parser.py +++ b/neb/parser.py @@ -1,4 +1,4 @@ -from structs import * +from .structs import * def parseExpression(token, prev, tokens): idx = 0 diff --git a/structs.py b/neb/structs.py index b5ea24a..09807db 100644 --- a/structs.py +++ b/neb/structs.py @@ -1,7 +1,7 @@ from dataclasses import dataclass from enum import Enum, auto from typing import Any -from typeclass import TypeEnum +from .typeclass import TypeEnum # tokens and types # NOTE: this can probably be simplified diff --git a/typeclass.py b/neb/typeclass.py index eae412c..eae412c 100644 --- a/typeclass.py +++ b/neb/typeclass.py |
