Initial commit - fix problems & refactor code
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
"""Exception classes for Lisp interpreter."""
|
||||
|
||||
|
||||
class error(Exception):
|
||||
"""Base exception for all Lisp-related errors."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class syntaxError(error):
|
||||
"""Raised when there is a syntax error in the Lisp code."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class runtimeError(error):
|
||||
"""Raised when there is a runtime error during evaluation."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class valueError(error):
|
||||
"""Raised when there is an invalid value."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class typeError(error):
|
||||
"""Raised when there is a type error during evaluation."""
|
||||
|
||||
pass
|
||||
Reference in New Issue
Block a user