Commit Graph

10 Commits

Author SHA1 Message Date
Thakee Nathees
d5b4b566e4 json library 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
2022-06-01 01:49:39 +05:30
Thakee Nathees
9ac483a5b0 path.listdir, dir functions were added 2022-05-28 01:13:08 +05:30
Thakee Nathees
da6105d46c term library added 2022-05-27 18:59:52 +05:30
Thakee Nathees
aac9bb37f7 invalid definition inside expression fixed 2022-05-27 17:14:23 +05:30
Thakee Nathees
22cecf4415 native call api implemented 2022-05-17 23:51:01 +05:30
Thakee Nathees
48089b2a1a native instance interface implemented 2022-05-17 07:08:14 +05:30
Thakee Nathees
b5d98ca4c3 adding globals support in native interface
pkSetGlobal function implemented to support adding globals from the
native interface. Also the PKVM slots doesn't need a runtime anymore to
use them (see math.PI global to see how it works).
2022-05-09 22:52:25 +05:30
Thakee Nathees
168f365cde import statements are refactored.
- all import statement (native or script file) have the same syntax
- allow relative (including parent directory) imports
- cyclic imports are handled by caching the scripts
- `import foo` can potentially import `<searchpath>/foo/_init.pk`
- * import are not supported anymore
2022-05-06 11:16:48 +05:30
Thakee Nathees
2713aaba35 operator overloading implementation.
at this point only binary operators are implemented, unary are yet
to do.

getters and setters for native classes implemented with the names
@getter, and @setter (however the names or arity aren't validated
at the moment TODO:)
2022-04-30 21:35:02 +05:30
Thakee Nathees
2fe579d9cc math module moved to cli/modules 2022-04-22 07:04:09 +05:30