Releases: dangduomg/baba-lang
Releases Β· dangduomg/baba-lang
v0.5.1-testing
What's new
- Bug fixes
- Added equality check to lists and dicts
- Exception classes are added, so you can throw them in code
Full Changelog: v0.5.0...v0.5.1-testing
v0.5.0 (The rewrite is officially done!)
What's Changed
- Revert to v0.4.4 by @dangduomg in #7
- 3rd rewrite by @dangduomg in #6
This rewrite added:
- Exception system (including
throw
,try
,catch
) - Better
include
handling - Iterator
for
- More magic methods (
dump
,to_string
,to_bool
)
Full Changelog: v0.4.4...v0.5.0
v0.5.0-testing (The rewrite is officially done!)
What's Changed
- Revert to v0.4.4 by @dangduomg in #7
- 3rd rewrite by @dangduomg in #6
This rewrite added:
- Exception system (including
throw
,try
,catch
) - Better
include
handling - Iterator
for
(isn't working yet) - More magic methods (
dump
,to_string
,to_bool
)
Full Changelog: v0.4.4...v0.5.0-testing
v0.4.5-testing-2 (Revert to 0.4.4)
What's Changed
- Revert to v0.4.4 by @dangduomg in #7
- A few bug fixes in v0.4.4
Full Changelog: v0.4.5-testing...v0.4.5-testing-2
v0.4.5-testing (Last version of 2024)
What's new
- Iterators and foreach loops are added. In objects, iterators can be run manually with the
__next__()
method and the__next__
method can be overridden for custom behavior. By the foreach loop, iterable objects (objects with__iter__
method) and lists can be conveniently iterated. The syntax is
for x in iterable {
...
}
- Add overriding support for stringification with
__dump__
and__str__
methods - Add support for throwing and catching errors with
throw
andtry..catch..finally
statements. Syntax:
try {
...
throw "error";
...
} catch e {
... # do something with e
} finally {
... # cleanup, will run no matter what
}
- Like 0.4.4-beta, 0.4.5-testing will have no more new features until 0.4.5-stable (simply just 0.4.5) releases. This is for testing and finding/fixing bugs
Full Changelog: v0.4.4...v0.4.5-testing
v0.4.4
What's Changed
- feat: add Docker support and development environment by @l-lumin in #5
- Added objects and classes (no inheritance yet, but operator overloading is present)
Syntax:
# Create a class
class MyClass {
fun __init__(a, b) {
this.a = a;
this.b = b;
}
fun do_something() {
return this.a + this.b;
}
}
# Create an instance of the class
my_instance = new MyClass(1, 2);
print(my_instance); # == <object of <class 'MyClass'>>
print(my_instance.a); # == 1
print(my_instance.b); # == 2
print(my_instance.do_something()); # == 3
- Biiiiiiiiig refactor and restructuring
- Bugs in v0.4.4-beta are now fixed (at least ones that I found)
New Contributors
Full Changelog: v0.4.3...v0.4.4
v0.4.4-beta
What's Changed
- feat: add Docker support and development environment by @l-lumin in #5
- Added objects and classes (no inheritance yet)
Syntax:
# Create a class
class MyClass {
fun __init__(a, b) {
this.a = a;
this.b = b;
}
fun do_something() {
return this.a + this.b;
}
}
# Create an instance of the class
my_instance = new MyClass(1, 2);
print(my_instance); # == <object of <class 'MyClass'>>
print(my_instance.a); # == 1
print(my_instance.b); # == 2
print(my_instance.do_something()); # == 3
- Biiiiiiiiig refactor and restructuring
- First feature freeze. This is the beta version, so features will not be added. Instead, this version is focused on testing and fixing bugs.
New Contributors
Full Changelog: v0.4.3...v0.4.4-beta
v0.4.3 (Merry Christmas Update! πππ)
What's Changed
- Fix Bug to convert the GC types to the python types. by @SohamTilekar in #4
- Added the power operator
**
- Added the static checker, to check for stray
break
,continue
orreturn
statements - Added
py_constant
for importing Python constants to baba-lang - Added
math.bl
standard library entry - Added methods for list:
lst.length
,lst.insert
andlst.remove_at
- Added methods for dict:
dct.size
,dct.keys
,dct.remove
- Python wrappers (created by
py_function
andpy_method
) can now return functions
New Contributors
- @SohamTilekar made their first contribution in #4
Full Changelog: v0.4.2...v0.4.3
v0.4.2
What's new
- Added logical operators (
&&
,||
,!
) - Added support for bitwise not (
~
) - Running
main.py
without argument now goes to interactive mode
Full Changelog: v0.4.1...v0.4.2
v0.4.1
What's changed
- Add
py_function
andpy_method
, easy ways to import python functions and methods to baba-lang - Add first stdlib entry (format.bl)
Full Changelog: v0.4.0...v0.4.1