* and / or logic refactored
* and / or opcodes added and stack size bug fixed
- and / or keywords were added.
- class construction function not poping the class instance
from the stack (fixed).
There are small typos in:
- README.md
- cli/modules.c
- src/pk_compiler.c
- src/pk_core.c
- src/pk_opcodes.h
- src/pk_vm.h
- tests/benchmarks/benchmarks.py
Fixes:
- Should read `temporary` rather than `temproary`.
- Should read `stdout` rather than `stdour`.
- Should read `sprintf` rather than `spritnf`.
- Should read `splitted` rather than `splited`.
- Should read `script` rather than `scirpt`.
- Should read `reported` rather than `repored`.
- Should read `reduce` rather than `recude`.
- Should read `performance` rather than `preformance`.
- Should read `instead` rather than `insted`.
- Should read `default` rather than `defalt`.
* Added log and round functions to math module
* Added log and round functions to math module
* Added a few math functions
* Static checks
* Maybe this will fix linux
* Fixed errors with styles and tests
This function takes in 3 arguments: the string, the position and the
length (of the substring). As a quick example, a call to the function
`str_sub('c programming', 3, 11)`
will return the string 'programming' as the substring to the string
that is provisioned to the function call.
Functions added are: `sinh(x)`, `cosh(x)`, `tanh(x)`, `asin(x)`,
`acos(x)`, and `atan(x)`.
In addition, basic tests added in core.pk for these functions.
* 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>
In conjunction with the ASCII char set, a byte should be any valid
character mapping to an integer between -128 to 127 (that is signed
integers as well).
Anything beyond can't fit into a byte hence this can't be a character
but 2 characters.
* Implement proper number literal parsing
- Scientific notation support
- Correct error handling in cases of invalid digits present in binary or
hex literals (0b123, 0x013FK).
* Fix style linter issues
* Support +/- in number literal exponent, add tests
- Add tests for scientific notation number literal parsing
- Add support for +/- in scientific notation exponents