Skip to content

Commit

Permalink
refactor!: make use of the mod.rs files instead of <module>.rs files
Browse files Browse the repository at this point in the history
This helps to organize the code in a better way, and it's more idiomatic
to Rust.

BREAKING CHANGE: this commit changes the way the modules are organized.
  • Loading branch information
Yag000 committed Aug 12, 2023
1 parent a9afdaa commit 72bf941
Show file tree
Hide file tree
Showing 30 changed files with 3,321 additions and 3,318 deletions.
2 changes: 1 addition & 1 deletion benches/array_bench.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};

use monkey::{compile_program, execute_interpreter, execute_vm, parse_program};
use chimpanzee::utils::{compile_program, execute_interpreter, execute_vm, parse_program};

const ARRAY_APPEND: &str = r#"
let push_n = fn (arr, n) {
Expand Down
2 changes: 1 addition & 1 deletion benches/fibonacci_bench.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};

use monkey::{compile_program, execute_interpreter, execute_vm, parse_program};
use chimpanzee::utils::{compile_program, execute_interpreter, execute_vm, parse_program};

const FIBONACCI_20: &str = r#"
let fibonacci = fn(x) {
Expand Down
2 changes: 1 addition & 1 deletion benches/formatter_bench.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use chimpanzee::formatter::Formatter;
use criterion::{black_box, criterion_group, criterion_main, Criterion};

use formatter::formatter::Formatter;

pub fn long_formatter_benchmark(c: &mut Criterion) {
let input = r#"
Expand Down
2 changes: 1 addition & 1 deletion src/bin/monkey.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use clap::Parser;
use chimpanzee::repl::repl::ReplCli;
use chimpanzee::repl::ReplCli;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
Expand Down
Loading

0 comments on commit 72bf941

Please sign in to comment.