Fix compiler bug; Rewrite CI workflow
This commit is contained in:
parent
0aee607961
commit
1f62391b58
14
.github/workflows/rust.yml
vendored
14
.github/workflows/rust.yml
vendored
@ -1,21 +1,19 @@
|
||||
name: Dust Tests
|
||||
name: Cargo Build & Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: ["main"]
|
||||
pull_request:
|
||||
branches: ["main"]
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
build:
|
||||
build_and_test:
|
||||
name: Dust Build & Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Build
|
||||
run: cargo build --verbose
|
||||
- name: Run tests
|
||||
run: cargo test --verbose
|
||||
- run: rustup update nightly && rustup default nightly
|
||||
- run: cargo build --verbose
|
||||
- run: cargo test --verbose --no-fail-fast
|
||||
|
@ -1116,12 +1116,20 @@ impl<'src> Compiler<'src> {
|
||||
self.emit_instruction(test, Type::None, operator_position);
|
||||
self.emit_instruction(jump, Type::None, operator_position);
|
||||
|
||||
let instruction_count_before_right = self.instructions.len();
|
||||
|
||||
self.advance()?;
|
||||
self.parse_sub_expression(&rule.precedence)?;
|
||||
|
||||
// TODO: Check if the right type is boolean
|
||||
|
||||
if matches!(
|
||||
if self.instructions.len() == instruction_count_before_right + 1 {
|
||||
self.instructions
|
||||
.last_mut()
|
||||
.unwrap()
|
||||
.0
|
||||
.set_a_field(left.index());
|
||||
} else if matches!(
|
||||
self.get_last_operations(),
|
||||
Some([
|
||||
Operation::EQUAL | Operation::LESS | Operation::LESS_EQUAL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user