- MethodBind type added.
- Now methods are first class and can be passed around as arguments
store as a variable and return it from a function and they're first
class callbales.
- Can bind instance to a method bind using .bind() method
- Class.methods() method added -> return a list of all methods as
method binds
- Module.globals() method added -> returns a list of all globals
of that module.
- Var._class -> attribute added which will return the class of the
variable
- Class.name, MethodBind.name, Closure.name attribute and Modue._name
attribute added
- Class._docs, Closure._docs, MethodBind._docs attribute added
- MethodBind.instance attribute added
- cJSON library was added to thirdparty for json module
- json module added and json.parse() function implemented
- thirdparty library sources are directly imported
- io.readfile() function added
- less than function fix (wasn't returning boolean)
- min, max functions added
- map check values equal implemented
- using normalized windows path in windows for import search.
- search path implemented, executable's path, exe/libs/ directories
added to the search path.
- cwalk library updated after buf fix:08e7520d33
- dl library support added and will be implemented.
- generate_native.py refactored.
- Objects that weren't pushed to PKVM's temp reference were fixed
- vm->bytes_allocated was modified after the re-calculation of garbage
collection fixed.
The primary purpose of this change is to disambiguate between
`else if` and `else \n if`.
Even though it's a breaking change, since it's at the very early
state we're allowed to make such breaking syntax change.
lang.write function moved to io and io.stdin, io.stdout, io.stderr
added for future streamed io operations
io.File read, write, open, close, getline, seek, tell implemented
str * int multiplication implemented
- check a string contains another with `in` keyword
- Number: isint, isbyte
- String: find, replace, split, startswith, endswith, strip
- Map: clear, has, get, pop
- list: insert, clear, find, pop
- removed str_sub builtin function as its redunent since we have
range slice over strings.
- moved lower, upper attributes of strings as methods
- ByteBuffer, and Vector classes were created. However thier methods are
limited, and to do.
- Strings supports new line escape "\\n".
- typename will return class name of an instance (was just 'Inst' fixed)
- _repr() method added. if _str method doesn' exists on an instance,
it'll try to call _repr() to make a string.
- number.isint(), number.isbyte() method added
- [], []= operator were added.
- Warnings were fixed
- Libraries are registered internally when PKVM created
and cleanedup when PKVM freed (if PK_NO_LIBS not defined)
- Lang.clock() moved to time module and sleep, epoch time
were added.
- Support both upper case and lower case hex literals
- Support hex excaped characters inside strings (ex: "\x41")
- Native api for import modules added `pkImportModule(...)`
- pkAllocString, pkDeallocString are changed to pkRealloc.
- NewInstance, DeleteInstance functions now take PKVM however
delete function should not allocate any memory since it's
invoked at the GC execution.