feat: CLI 支持 REPL 编译到字节码

This commit is contained in:
爱特每羊队
2026-06-05 03:02:52 +08:00
parent 160e972f77
commit b65a0678f2
2 changed files with 52 additions and 21 deletions
+4 -4
View File
@@ -10,8 +10,8 @@ fn eval_simple_expression() {
assert!(output.status.success(), "eval 1+2 should exit 0");
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(
stdout.contains("Program"),
"output should contain AST node: {stdout}"
stdout.contains("HALT"),
"output should contain HALT bytecode: {stdout}"
);
}
@@ -44,8 +44,8 @@ fn run_file() {
assert!(output.status.success(), "run hello.js should exit 0");
let stdout = String::from_utf8_lossy(&output.stdout);
assert!(
stdout.contains("Program"),
"run output should contain AST node"
stdout.contains("HALT"),
"run output should contain bytecode: {stdout}"
);
}