Skip to content

Commit

Permalink
chore: remove dbg! calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakFarmer committed Oct 29, 2023
1 parent c50702e commit bd873d8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,19 @@ With this project I'm attempting to create a lightweight PHP interpreter built u
It's currently in its early stages and is meant for experimental and educational purposes.

## Try it out
I've deployed the REPL to the web using WebAssembly (see the ```wasm``` directory)

I've deployed the REPL to the web using WebAssembly (see the `wasm` directory).
A GitHub Action is used to build and deploy it to S3 on every push to the `main` branch.

You can find it [here](https://php-rs.zakfarmer.com).

## Features

- Basic arithmetic operations
- Conditional operators / boolean expressions
- First-class functions
- Variable assignment & scopes
- WASM binary

Expect this list to grow 😁

Expand All @@ -35,11 +40,13 @@ cargo run
```

To run the testsuite:

```bash
cargo test
```

## Credits

The design of the project was heavily influenced by Thorsten Ball's "Writing an Interpreter in Go" and "Writing a Compiler in Go", of course adapted to Rust.
100% recommend reading both as they're great books if you're interested in language fundamentals.

Expand Down
2 changes: 0 additions & 2 deletions compiler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,6 @@ impl Compiler {
Expression::Identifier(identifier) => {
let symbol = self.symbol_table.resolve(&identifier.value);

dbg!(&symbol);

match symbol {
Some(symbol) => {
self.emit(
Expand Down
4 changes: 1 addition & 3 deletions vm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,7 @@ impl Vm {
})?;

let opcode = Opcode::from(op);

dbg!(opcode);


match opcode {
Opcode::OpJump => {
let jump_position = BigEndian::read_u16(
Expand Down
3 changes: 0 additions & 3 deletions vm/tests/vm_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -415,9 +415,6 @@ fn test_variable_scopes() -> Result<(), Error> {

// TODO: remove duplication and extract helper function for use in multiple tests
fn assert_constants(expected: &Vec<Object>, actual: &Vec<Rc<Object>>) {
dbg!(expected);
dbg!(actual);

assert_eq!(expected.len(), actual.len());
for (exp, b_got) in expected.iter().zip(actual) {
let got = b_got.borrow();
Expand Down

0 comments on commit bd873d8

Please sign in to comment.