diff --git a/CHANGELOG.md b/CHANGELOG.md index bbade96..e7fefc8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,18 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## A Look to the Future - Support for variables in the `catch` statement - The ability to use keyword arguments when calling a function -- **kwargs (Keyword Arguments) - More exceptions & error messages - Better interfacing with python code from ParaCode -- An entire interfacing module for ParaCode/Rust communication to maintain parity and compatibility with the Rust port (Python interfacing probably won't be added to the port) - A complete requests HTTP module -- A more advanced unit tests module +- A more advanced (and real) unit tests module +- Async functionality +- Threading - A better icon +- The rebranding of the entire language from ParaCode to either Jet or Jetstream (JTS) ## [2.1.0] - CURRENTLY UNRELEASED ### Added - Easy use of default parameters in functions -- *args (Non-Keyword Arguments) +- Non-Keyword Arguments - Complete regex support - Some basic exceptions - A reflection module diff --git a/error.py b/error.py index ba74d97..a2aff77 100644 --- a/error.py +++ b/error.py @@ -2,10 +2,10 @@ from util import LogColor class InterpreterError(Exception): - def __init__(self, m, node=None, type=None, message=None, cont=False, name=None, classnames=None, object=None): + def __init__(self, m, node=None, ty=None, message=None, cont=False, name=None, classnames=None, object=None): super().__init__(m) self.node = node - self.type = type + self.type = ty self.message = message self.cont = cont self.name = name @@ -23,8 +23,8 @@ class ErrorType(Enum): InterruptedError = auto() class Error(): - def __init__(self, type, location, message, filename, name="Exception"): - self.type = type + def __init__(self, ty, location, message, filename, name="Exception"): + self.type = ty self.filename = filename self.message = message self.location = location diff --git a/interpreter/basic_value.py b/interpreter/basic_value.py index 4608fbe..36e8c6c 100644 --- a/interpreter/basic_value.py +++ b/interpreter/basic_value.py @@ -25,6 +25,7 @@ def extract_value(self): def lookup_type(self, global_scope): from interpreter.basic_object import BasicObject + # print(type(global_scope)) if isinstance(self.value, BasicValue):#type(self.value) == BasicValue: return self.value.lookup_type(global_scope) diff --git a/parse/parser.py b/parse/parser.py index b29ca8b..618dba8 100644 --- a/parse/parser.py +++ b/parse/parser.py @@ -600,7 +600,6 @@ def parse_function_call(self, node): self.eat(TokenType.LParen) argnames = [] - arg = None last = self.current_token if self.current_token.type is not TokenType.RParen: @@ -658,6 +657,7 @@ def parse_arrow_function(self, node): arguments = [] if isinstance(node, NodeVariable): + print(type(node.token)) arguments.append(NodeDeclare(None, node.token, NodeNone(token))) if self.eat(TokenType.Arrow) is None: diff --git a/std/types/math/matrix4.para b/std/types/math/matrix4.para index 3912446..89b234c 100644 --- a/std/types/math/matrix4.para +++ b/std/types/math/matrix4.para @@ -223,7 +223,7 @@ let Matrix4 = Iterable.extend({ } func len(self) { - let _rval = 3; + let _rval = 4; return _rval; } diff --git a/std/util/langinfo.para b/std/util/langinfo.para index b9505ce..806d586 100644 --- a/std/util/langinfo.para +++ b/std/util/langinfo.para @@ -5,7 +5,7 @@ let LangInfo = Type.extend({ return "2.1.0"; } - func get_extension_language() { - return "Python"; + func get_extensions_language() { + return "python"; } });