Compare commits
2 Commits
6085eb0d6e
...
main
Author | SHA1 | Date | |
---|---|---|---|
8f8f8ffe80 | |||
6ed7838a53 |
@ -1,3 +1,5 @@
|
|||||||
|
**Moved to [Codeberg](https://codeberg.org/0x4261756D/kurz)**
|
||||||
|
|
||||||
# kurz
|
# kurz
|
||||||
|
|
||||||
Queue based language
|
Queue based language
|
||||||
|
@ -954,7 +954,7 @@ fn interpret_program(operations: &Vec<Operation>, queue: &mut Vec<String>, funct
|
|||||||
}
|
}
|
||||||
Operation::Dup(_, _) =>
|
Operation::Dup(_, _) =>
|
||||||
{
|
{
|
||||||
let val = queue.get(0).unwrap();
|
let val = queue.first().unwrap();
|
||||||
queue.push(val.clone());
|
queue.push(val.clone());
|
||||||
}
|
}
|
||||||
Operation::Swap(_, _) =>
|
Operation::Swap(_, _) =>
|
||||||
@ -1249,7 +1249,7 @@ fn get_return_type(operations: &Vec<Operation>, ins: &[Datatype], functions: &Ve
|
|||||||
}
|
}
|
||||||
Operation::Dup(line, col) =>
|
Operation::Dup(line, col) =>
|
||||||
{
|
{
|
||||||
if let Some(typ) = type_queue.get(0)
|
if let Some(typ) = type_queue.first()
|
||||||
{
|
{
|
||||||
type_queue.push(*typ);
|
type_queue.push(*typ);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user