Commit Graph

19 Commits

Author SHA1 Message Date
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
402f36f7e5
docs were fully refactored (#175) 2022-04-04 08:47:15 +05:30
Thakee Nathees
6e02e021bc
some comments were added (#169) 2022-03-30 23:43:18 +05:30
Thakee Nathees
89f8b77bb6
imported scripts were initialized (#158) 2021-07-02 21:32:30 +05:30
Thakee Nathees
273a31e588 native types initialization & attribute getters. (#147)
getters/setters native api functions added to the
vm's configurations and native types were initialized.
2021-06-29 00:30:41 +05:30
Thakee Nathees
a22c4cb90d
CLI argparse implementation. (#136)
* argparse library added to third parth.

We're using argparse (https://github.com/cofyc/argparse) repo to parse
cli args.

* parsed arguments applied to the cli.

Co-authored-by: Derick Alangi <alangiderick@gmail.com>
2021-06-24 23:08:44 +05:30
Tiago Cavalcante Trindade
792d08eae7
Move fiber functions to module Fiber (#113) 2021-06-23 09:48:15 +05:30
Thakee Nathees
41ed7dd991 class implemented 2021-06-21 12:13:37 +05:30
Thakee Nathees
258b64948e yet another minor refactor 2021-06-20 15:53:21 +05:30
Thakee Nathees
4ba3ee2e28 __file__ added and some todos were completed 2021-06-20 09:29:26 +05:30
Alexander Patel
c58159b63d
Fix typos + rename variables (#73)
* fixed typos in src/

* fixed typos in docs/

* fixed typos in README and tests/

* rename INITALIZE to INITIALIZE

* rename PRIMITE to PRIMITIVE

* rename moudle to module

Co-authored-by: Alexander Patel <acpatel@andrew.cmu.edu>
2021-06-15 13:07:49 +05:30
Thakee Nathees
72e7522c12 operator andeq implemented 2021-06-14 21:50:07 +05:30
Thakee Nathees
d7f7c21081
Merge pull request #62 from ThakeeNathees/tco
Tail call optimization implemented
2021-06-13 21:58:36 +05:30
Thakee Nathees
6992f54ef3 Tail call optimization implemented 2021-06-13 21:57:54 +05:30
Derick Alangi
22be6af376 Add support for bitwise XOR, LSHIFT and RSHIFT operators (#63)
This commit addresses issue #54 in an attempt to add more bitwise
operators to pocketlang. Tests have also been written to verify that
the operators indeed works as expected.

To add, I also introduced a macro PK_RIGHT_OP that just aliases the
string "Right operand" which was already getting too hardcoded and
appearing too much in the pk_core.c file.
2021-06-13 20:27:48 +05:30
Thakee Nathees
17df5eb1e4 disassemble implemented 2021-06-12 16:34:10 +05:30
Thakee Nathees
749456e215 some (minor) code cleanups 2021-06-11 13:16:55 +05:30
Thakee Nathees
9fdab23a94 core attributes refactored and added tests 2021-06-10 23:12:04 +05:30
Thakee Nathees
49c1fec85f
REPL implementation. (#47) 2021-06-09 16:12:26 +05:30