for nested functions the count of locals and the required stack size
are miss-calculated, ie. No new count wasn't started for inner functions
it makes the required stack size greater than or equal to it's enclosing
functions stack size.
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.
* 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
Currently, it is required for the shell's working directory to be in
the repo's test/ directory in order for the tests to run correctly.
This also applies for the static analysis checker.
The reason for this is that paths in the test orchestration code are
defined relative to the test directory. Instead, and since none of
these scripts are modules that will in the forseeable future be
imported into other files, we update all paths to be relative
to the absolute path of the script's file itself.
┏( ͡❛ ͜ʖ ͡❛)┛
This commit implements list addition. A new list is allocated, and
the contents of l1 and l2 are concatenated onto the list.
This is done by extending the buffer template macro to support a
`concat` operation, which given an `other` buffer, appends all
elements of the `other` buffer to the end of the `self` buffer.
Allocations are done as needed.
We implement this additional operation, since the alternative would
be to call `reserve()` for each `write()` operation, which doesn't
seem ideal.
Issue: #55
* 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>