Skip to content

Commit

Permalink
📂 ezr v2.0.0.2.0!
Browse files Browse the repository at this point in the history
  • Loading branch information
Uralstech committed Nov 14, 2022
1 parent 2f4226d commit 4dd8d23
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 33 deletions.
34 changes: 4 additions & 30 deletions AFTERINSTALL.txt
Original file line number Diff line number Diff line change
@@ -1,35 +1,6 @@
THANK YOU FOR DOWNLOADING EZRSHELL
-----------------------------------------------------------------------------------------------------

[31-10-22] ezr v2.0.0.0.0 (part 1)!
- Simpler lower case keywords
- Starting work on dictionary type
- 'len' function is now 'length_of'
- Some bugfixes for error messages
- A lot of object-related bugfixes

[02-11-22] ezr v2.0.0.0.0 (part 2)!
- New dictionary type
- List type is now mutable
- All builtin types are now hashable
- 'in' statement now supports DICTIONARYs
- New 'DICTIONARY-KEY' error tag for key access/assign errors
- New 'hash' function
- Removed 'extend' and 'remove' functions
- 'type_of' function now returns name of input values' class (eg: type_of('abc') = 'String')
- 'convert' function 'type' input should be [STRING] literals 'String', 'Int', 'Float' or 'Bool'

[02-11-22] ezr v2.0.0.0.0 (part 2.5)!
- HUGE optimizations for dictionary type

[02-11-22] ezr v2.0.0.0.0 (part 3)!
- New immutable array type
- 'in' statement now supports ARRAYs
- 'convert' function now supports LIST to ARRAY / ARRAY to LIST conversions with 'type' inputs
'Array' and 'List'
- 'join' function now supports all types that can be converted into a string
- 'length_of' function now supports ARRAYs

[04-11-22] ezr v2.0.0.0.0 RELEASE!
- Empty ARRAYs can now be defined with '()'
- Multiplication and division support for ARRAY
Expand All @@ -50,8 +21,11 @@ THANK YOU FOR DOWNLOADING EZRSHELL
[14-11-22] ezr v2.0.0.1.3!
- Updated ezrShell with better code

[14-11-22] ezr v2.0.0.2.0!
- Fixed bug in libraries for RTE_TOOMANYARGS and RTE_TOOFEWARGS RuntimeErrors
which wouldn't show the name of the function itself

Other news
- ezr v2m0 documentation is out!
- ezrlang in Malayalam is out (pre-release) -> https://github.com/Uralstech/ezrMlang

-----------------------------------------------------------------------------------------------------
Expand Down
Binary file modified Builds/ezrShell v2m0 Installer.exe
Binary file not shown.
8 changes: 6 additions & 2 deletions Libraries/base/base_libObject.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ezr import Interpreter, RuntimeResult, RuntimeError, VarAccessNode, CallNode, ObjectCallNode, BaseFunction, Nothing, RTE_UNDEFINEDVAR, RTE_INCORRECTTYPE
from ezr import Interpreter, RuntimeResult, RuntimeError, VarAccessNode, CallNode, ObjectCallNode, BaseFunction, Nothing, RTE_TOOMANYARGS, RTE_TOOFEWARGS, RTE_UNDEFINEDVAR, RTE_INCORRECTTYPE

class base_libObject(BaseFunction):
def __init__(self, name, internal_context=None):
Expand Down Expand Up @@ -29,7 +29,11 @@ def retrieve_and_call_function(self, node):

if method:
res.register(self.check_and_populate_args(method.arg_names, args, self.internal_context))
if res.should_return(): return res
if res.should_return():
if res.error:
if res.error.error_type == RTE_TOOMANYARGS: res.error = RuntimeError(node.start_pos, node.end_pos, RTE_TOOMANYARGS, f'{len(args)-len(method.arg_names)} too many arguments passed into \'{call_name}\'', self.context)
elif res.error.error_type == RTE_TOOFEWARGS: res.error = RuntimeError(node.start_pos, node.end_pos, RTE_TOOFEWARGS, f'{len(method.arg_names)-len(args)} too few arguments passed into \'{call_name}\'', self.context)
return res

return_value = res.register(method(node, self.internal_context))
if res.should_return(): return res
Expand Down
2 changes: 1 addition & 1 deletion ezr.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# CONSTANTS

VERSION = '2.0.0.1.3'
VERSION = '2.0.0.2.0'
VERSION_DATE = '14-11-22'
NUMBERS = '0123456789'
ALPHABETS = ascii_letters
Expand Down

0 comments on commit 4dd8d23

Please sign in to comment.