This commit adds a new data type to the codebase. It organizes data into first in last out linked lists of first in last out linked lists. Hence the name: StackStack. This data type was made to represent frames of execution, where there there is a stack for each function call containing local variables and arguments. The following tertiary goals were also met: - no relocating of adjacent data on push or pop - no copying or cloning of contained data on modification or mutation - index access to all elements of all contained stacks starting with most recent insertions. There are operations to allocate a new stack on the stackstack and to deallocate the top stack on the stackstack. Additionally there are operations for pushing and popping from the top stack. Unit tests are added and CI is updated to include them. Signed-off-by: Ava Affine <ava@sunnypup.io>
37 lines
558 B
YAML
Executable file
37 lines
558 B
YAML
Executable file
default:
|
|
image: rustlang/rust:nightly
|
|
|
|
stages:
|
|
- build
|
|
- test-frontend
|
|
- test-backend
|
|
|
|
compile-library:
|
|
stage: build
|
|
script:
|
|
- cargo build --lib
|
|
|
|
compile-decomposer:
|
|
stage: build
|
|
script:
|
|
- cargo build --bin decomposer
|
|
|
|
unit-test-lexer:
|
|
stage: test-frontend
|
|
script:
|
|
- cargo test lexer
|
|
|
|
unit-test-parser:
|
|
stage: test-frontend
|
|
script:
|
|
- cargo test parser
|
|
|
|
unit-test-number-package:
|
|
stage: test-backend
|
|
script:
|
|
- cargo test number
|
|
|
|
unit-test-stackstack:
|
|
stage: test-backend
|
|
script:
|
|
- cargo test stackstack
|