mirror of
https://github.com/Noratrieb/crapderive.git
synced 2026-01-15 00:55:06 +01:00
spec
This commit is contained in:
parent
25e794f779
commit
6fb37b2588
2 changed files with 101 additions and 1 deletions
|
|
@ -22,6 +22,8 @@ impl Register {
|
|||
}
|
||||
}
|
||||
|
||||
const MEMORY_SIZE = 1024 * 1024 * 1024;
|
||||
|
||||
struct InterpretCtx {
|
||||
memory: Vec<u8>,
|
||||
registers: [u64; 16],
|
||||
|
|
@ -151,9 +153,10 @@ impl InterpretCtx {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
pub fn interpret(stmts: Vec<Stmt>, spans: Vec<Span>) -> Result<()> {
|
||||
let mut ctx = InterpretCtx {
|
||||
memory: vec![0; 100_000],
|
||||
memory: vec![0; MEMORY_SIZE],
|
||||
registers: [0; 16],
|
||||
flag: false,
|
||||
stmts,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue